I need an sql query to give me the following:
All the values in a column of type varchar(50) which will NOT convert or will throw an error if cast / converted to an int.
E.g.
row 1: ‘1’
row 2: ‘2’
row 3: ‘3a’
row 4: ‘4.5’
I need row 3….however there are tens of thousands of rows.
Thanks!
http://msdn.microsoft.com/en-us/library/aa933213(SQL.80).aspx
e.g.,
Edit: Actually, this wouldn’t quite cut it if you want precisely int only. Try this instead. If you only want int range, then throw in a range check as well (feeling a bit lazy at this point).