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!

ORA-01722: invalid number: when trying to Save multiple values with PopUp LOV

SmithJohn45Feb 11 2022 — edited Feb 11 2022

created a Blank page (to test to have Multiple Tags), then created a Static region, on region added 2 items

  1. P25_TAG which is a PopUp LOV, Modal Dialog, Multiple Values On, Separator :
  2. Button (Confirm) to Submit page
    when user press button, there is a process as below:
 for i in (select
   to_number(:P25_TAG) tid
  , lov.column_value tval
 from
   table(apex_string.split_numbers(:P25_TAG, ':')) lov
 )
 loop
  insert into tags (TAG_ID, TAG_DESC) VALUES (i.tid, i.tval);
 end loop;

it works fine, saves selected Tag value in table when selects only 1 as Tag ( both tid and tval has same numeric values )
problem is when selecting more than 1 and trying to Save pressing Confirm button, it throws error: ORA-01722: invalid number
please help what i am doing wrong here? my table contains only 2 columns
tag_id number , tag_desc varchar2(500)
regards
image.png

This post has been answered by jariola on Feb 11 2022
Jump to Answer
Comments
Post Details
Added on Feb 11 2022
4 comments
847 views