Please support our MS SQL advertiser: Programming Forums
Views: 4993 | Replies: 4
![]() |
•
•
Join Date: Oct 2005
Location: Manchester, UK
Posts: 482
Reputation:
Rep Power: 4
Solved Threads: 34
i dont use SQL Server much these days, but is there not a isNumber() or isNumeric() function?
If there isn't im sure writing your own wouldnt be that difficult. Just attempt to cast a varchar as a number and if it succeeds its a number. If it doesnt, it aint.
The 'real' solution to this is to fix your database so that text data is stored in char/varchar fields and numeric data is stored in the appropriate numeric type.
If there isn't im sure writing your own wouldnt be that difficult. Just attempt to cast a varchar as a number and if it succeeds its a number. If it doesnt, it aint.
The 'real' solution to this is to fix your database so that text data is stored in char/varchar fields and numeric data is stored in the appropriate numeric type.
•
•
Join Date: Jul 2005
Location: Dallas, TX
Posts: 482
Reputation:
Rep Power: 4
Solved Threads: 19
pty is right. this should do it for you
select * from tablename where isnumeric(columnname) = 1
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode