I have a field which is a char type, but generally will contain numbers. I want to convert this to an int datatype so that I can perform mathematical expressions on it. The problem I'm running into is that sometimes people are entering non-numerical data into this field. Is there a way that I can strip off the non-numerical data so I only have the numbers?
converting char to int question
Collapse
X
-
Yes.
But you may want to consider if the value on the columns is accurate in the first place. You might have to parse the value of the column.
You may use these functions:
ISNUMERIC()
http://msdn.microsoft. com/en-us/library/aa226054(SQL.80 ).aspx
-- CK
Comment