CREATE GLOBAL TEMPORARY TABLE tt_temptable(
RowNums NUMBER(3,0),
procNums NUMBER(18,0)
) ON COMMIT PRESERVE ROWS;
inputString VARCHAR2 ;
inputString := '12,13,14,15'
SELECT REGEXP_SUBSTR (inputString,'[^,]+',1,LEVEL) ProcNums
FROM dual CONNECT BY REGEXP_SUBSTR (inputString,'[^,]+',1,LEVEL) IS NOT NULL;
INSERT INTO tt_temptable(
SELECT identity(3) RowNums,procNums
FROM
);
Want to insert 12 , 13, 14 , 15 and identity of 3 length in the temptable so total 4 rows in temptable