Converting String to numeric - want to detect before conversion.
Posted on 2007-08-06
is there a way to check if a value that is returned is numeric?
I have some data which looks like below:
I need to convert all the values in ColumnB into numeric, and sort the value such that B in columnA gets pickup in the end. But if I use "to_numeric" now to convert the field, I have problem coz' there's a "NA" in the value. How do I make sure that I can, perhaps by using "Case", pick up that it is non-numeric and skip converting it? Or if found "NA", convert into "-9999" ?