How to find rows where a column contains a number

I needed to pull out all rows where a user id was numeric, SQL Server (as of 2005) has a  function IsNumeric:

FROM Users
Where IsNumeric(UserID) = 1

ISNUMERIC returns 1 when the input expression evaluates to a valid numeric data type; otherwise, it returns 0


Related Posts

%d bloggers like this: