Forum Moderators: phranque

Message Too Old, No Replies

SQL server 2K - wildcard to match any tinyint?

         

galad

4:58 am on Feb 5, 2005 (gmt 0)

10+ Year Member



Hi :)

I'm developing on a SQL Server 2000 database and am having problems with a stored procedure. I need to set an input to a default value that will match all numbers in the range of tinyint. Using the wildcards %,_ and [^0] results in an error:

syntax error converting the varchar value '[^0]' to a column of data type tinyint.

galad

5:06 am on Feb 5, 2005 (gmt 0)

10+ Year Member



It seems that just after I post a question on a forum, I figure out the answer ;)

Using 'LIKE' instead of '=' in the WHERE clause solves the problem.