>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-3837ce3a840eIf 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.
If it's not broken, fix it until it is.
My Blog