>>What is fred doing at the end of your code - was it for test? Add print @SQL before executing, you will see the error.
>>
>
>See my reply to Boris.
You have an extra + before like.
It should be
where myField LIKE '%' + @SomeNumber + '%'
Also, if the number is nchar(5) when what is the point of using LIKE at all? You should use
Number = @SomeNumber
If it's not broken, fix it until it is.
My Blog