Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert varchar2 to number?

Geert01Nov 24 2022

Hi,
I need to do some cross-record validations on an IG. I have changed the default Save action to first call an Ajax Callback routine that stores all the records of the IG into a collection and then uses the collection to do the cross-record validations I need.
In my case the sum of all amounts in the IG must match a specific amount stored in a page item that has the format set to 999G999G999G999G990D00
image.pngThis value is passed to a stored procedure as a varchar2 using apex_application.g_x02 .
In the stored procedure I need to convert this varchar to number but this raises an error Error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error.
This application will also run with a Dutch translation. In that case the number looks like:
image.pngWhat should I do to get the to_number function to work as expected?

This post has been answered by InoL on Nov 24 2022
Jump to Answer
Comments
Post Details
Added on Nov 24 2022
2 comments
1,940 views