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 |
|
davidpardoe
Constraint Violating Yak Guru
324 Posts |
Posted - 2001-08-13 : 11:06:39
|
| OK - I think I've finally found a stupid feature in SQL Server!I have a varchar field that I wish to convert to an int. The field sometimes contains ' .' - thanks to the data supplier. I had previously written a function to check if the field is numeric before "casting" it as an int.However...select isnumeric(' .') returns 1But select cast(' .' as int) returns an errorSurely if isnumeric() returns true then cast should be able to convert it? Incidentally casting as a float does not work either.I'm using SQL2K if it makes a difference.Any thoughts or comments? |
|
|
|
|
|