I have a table with varray of number field type aptitude_list as varray(60) of number
and want to save/update a comma separated list from an apex-text-field in it.
My SQL statement looks like :
INSERT INTO tbl_aptitude (ID, APTITUDE)
VALUES ('12345678', aptitude_list(1,2,3,4));
and works fine in SQL Developer.
Now I want to replace the numbers with my textfield aptitude_list(:P7_APTITUDE)
with P7_APTITUDE='1,2,3,4'
. This can´t be saved, because '1,2,3,4'
is not valid number.
How can I tell the system, that I want to store four different numbers and not one?
Thanks for your help!
There are many, many ways to split a delimited string in Oracle.
One way is to use a function:
Oracle Setup:
Then you can use:
Query:
Output: