Saturday, April 17, 2010

conversion differences between TO_NUMBER and TO_CHAR

It was interesting to note that what works in TO_CHAR conversion does not in TO_NUMBER. For TO_CHAR, I passed 12.56 for parameter1 and '999.9' for parameter2. It returned 12.6(has obviously rounded it up. Whereas, try it for TO_NUMBER, ORACLE returned an error ORA-01722

No comments: