How to convert any datatype to a number
Hi --
I have a query I'm writing, and for error-trapping purposes I want to convert whatever information I received in a bind variable into a number.
For instance, in my query:
SELECT TO_NUMBER('c') FROM dual
I get an error because 'c' is not a number. I'm usually expecting a number, but if for some reason I receive a character, I want to convert that character to a zero, and if I do receive a number I want it to retain its value. I hope this is clear!!!
Any suggestions are greatly appreciated.
Thanks,
Christine