June 7, 2004 at 7:56 am
if i have the following simple query
select * from Program where Executable = 'Psuedo program'
this works fine
if i have another entry in Program with Executable set to '@Psuedo program'
and then try
select * from Program where Executable = '@Psuedo program'
this returns nothing ...
any idea why ?
*********************** update - ************************************
the values seem to be different in the database
i have cast both values as varbinary and got the following results
parameter > 0x40506172616D44657461696C732020676F
value in database > 0x40506172616D44657461696C730D0A676F
they look identical (i have done the ltrim(rtrim( thing)
any ideas ?
cheers
dbgeezer
June 7, 2004 at 8:38 am
Try using
select * from Program where Executable = @Psuedo program
June 7, 2004 at 8:46 am
@ identifies a variable, so SQL Server is confused when you are using at the beginning of a string.
The single quotes should work, but try this instead:
[@psuedo program]
-SQLBill
June 7, 2004 at 9:05 am
it turned out there were \r\n chars in the database ...
cheers
dbgeezer
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply