| | |
WHERE field *has a numeric value?*
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
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
Posts: 483
Reputation:
Solved Threads: 19
pty is right. this should do it for you
MS SQL Syntax (Toggle Plain Text)
SELECT * FROM tablename WHERE isnumeric(columnname) = 1
![]() |
Similar Threads
- Javascript - Expected J and Expected Object errors (JavaScript / DHTML / AJAX)
- Best way to develop db for survey? (Database Design)
- help with union and bit field structure. (C++)
- Autonumber in a SQL Server table (MS SQL)
- how can i format a text field value with commas in a numeric amount. (JavaScript / DHTML / AJAX)
- I need some help with my C++ program please (C++)
Other Threads in the MS SQL Forum
- Previous Thread: finding feild type/table layout
- Next Thread: inserting coloring text
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger getdate highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multiple multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing tables uniqueid update view weekday





