The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question.
Asked: August 12, 2022 - 1:49 pm UTC
Last updated: August 16, 2022 - 2:35 am UTC
Version: apex on cloud
Viewed 10K+ times! This question is
declare v_list varchar2(4000); begin begin v_list := :P4_STATES; exception when no_data_found then v_list :='0'; end; for y in (select * from(table(DBMS_UTILITY.comma_to_table(:P4_STATES)))) loop INSERT INTO COVIDAPI(STATES_NO) values(y.COLUMN_VALUE); end loop; for y in (select * from(table(comma_to_table(:P4_POSITIVE)))) loop insert into COVIDAPI(POSITIVE) values(y.column_value); end loop; for y in (select * from(table(comma_to_table(:P4_NEGATIVE)))) loop insert into COVIDAPI(NEGATIVE) values(y.column_value); end loop; end;
select * from all_objects where object_name ='COMMA_TO_TABLE'
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library