TO_NUM and error handling [message #281121] |
Thu, 15 November 2007 16:06 |
jfrano
Messages: 11 Registered: January 2007 Location: New York
|
Junior Member |
|
|
Is there a way to use the TO_NUM function in a Discoverer Report such that it will not fail with "Invalid Number" error.
Thanks
|
|
|
|
|
Re: TO_NUM and error handling [message #281218 is a reply to message #281125] |
Fri, 16 November 2007 03:02 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
It's early in the morning,and I know that this can be done tidier (using reg expressions) but I require food and coffee, so here is what I can give you:
to_number(nvl2(replace(translate(xyz,'1234567890.','~#-'),'~#-',''),'0',xyz))
where xyz is the name of your item.
|
|
|
|