Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select with Like not working with parameter
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01537428
Message ID:
01537511
Views:
39
Hi Naomi.
I've read the explanation .... who designed these things anyway !!!!
For now ' I'll use VarChar and also look at Dynamic Sql
Many thanks again for your thorough investigation
Regards,
Gerard




>>Hi Naomi
>>I must be missing something !!
>> '%025c1% Selects but > '%25c1%' does not
>>If it was a padding thing, would both of these not be padded so you would expect neither to select
>>Whats the difference , other than the number of characters (Defined as C(10) ) so both cases its not even near the 10 characters
>>Regards,
>>Gerard
>>
>Ok, I got the answer
>http://social.msdn.microsoft.com/Forums/en/transactsql/thread/8a848b7d-f6a5-40fc-86b9-3837ce3a840e
>
>If the number of trailing spaces in the field and in the parameter matches, then you'll get the match. That's why we have such weird results.
>
>The solution is what I gave you - use varchar for the parameter so trailing spaces will not be a problem.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform