[quoted text, click to view] > : Syntax error converting the varchar value '\' to a column of data
> type int. Any idea?
Although we have no DDL for the LoginStuff table, it seems that either your
domain or userid column is an int data type. Although a technique like the
one Reg suggested will avoid the error, it seems strange to me that you
would want to concatenate an integer value in this way. Perhaps your
intention was to specify a column like username instead of userid?
--
Hope this helps.
Dan Guzman
SQL Server MVP
[quoted text, click to view] "Reg Besseling" <RegBesseling@discussions.microsoft.com> wrote in message
news:DAB98B36-15B4-44AD-BD4D-CDF81FDA0087@microsoft.com...
> Hi Troy
>
> Try
>
> select cast (domain as varchar(10)) + '/'+ cast(userid as varchar(10))
> from LoginStuff
>
> R.
>
> "troy" wrote:
>
>> hello,
>>
>> I need to add a blackslash to my select statement e.g. SELECT domain +
>> '\' +
>> userid from LoginStuff but when I try and do it this gives me the
>> following
>> error: Syntax error converting the varchar value '\' to a column of data
>> type int. Any idea?
>>
>> thanks
>>
>>
>>
>>