Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mAdMaLuDaWg
Starting Member
42 Posts |
Posted - 2004-04-14 : 14:33:34
|
| Is there any easy way to Select all the non-integer values from a column of type varchar? |
|
|
mAdMaLuDaWg
Starting Member
42 Posts |
Posted - 2004-04-14 : 14:45:05
|
| Never mind, its not like '[0-9]%' :o |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-04-14 : 14:52:58
|
| That will only give you columns that do not start with a numeric. It won't "select all the non-integer values" from a column. ???Is that all you're looking for?If all you want to do is differentiate between a numeric and non-numeric column (every character being a number = numeric) then use ISNUMERIC(field) = 0. This will be more efficient then doing a wildcard search.If you need to strip numerics out of a varchar column, let us know and we can provide a funtion to do that.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-04-15 : 04:53:08
|
| "(every character being a number = numeric) then use ISNUMERIC(field) = 0"is not quite true....for example....Execute select isnumeric(1e0).....and you get 1isnumeric evaluates if the parameter is a number....and it interprets multiple formats....including scientific + decimal notation |
 |
|
|
|
|
|