Rich (Rich@) writes:
It depends on exactly what you mean with numeric. There is a function
isnumeric(), but it's useless, because it returns 1, if the value
can be converted to any numeric data type, but you don't know which.
In practice, most of the time what you are really looking for is "is
string digits only"? In that case, this will do:
SELECT * FROM tbl WHERE col LIKE '%[^0-9]%"
Erland Sommarskog, SQL Server MVP, firstname.lastname@example.org
Books Online for SQL Server 2005 at
Books Online for SQL Server 2000 at