I am getting a string of data from application in the variable Pvalue1= a;b;c;e%;f%;h%; which is input from an excel. In my pl/sql code I want to store them in two different variables like this
v1= 'a';'b';'c'; v2= e%f%h%
I am using the below code but this does not seem to be working as expected.
FOR i in 1..FileRowCount LOOP
if instr(v1,'%')=0 then
v1 := SUBSTR(Pvalue1,0,INSTR(Pvalue1, ';',1,1)-1)||v1
elsif instr(v1,'%')<>0 then
v2 := SUBSTR(Pvalue1,0,INSTR(Pvalue1, ';',1,1)-1)||v2
end if;
Pvalue1 := SUBSTR(Pvalue1,INSTR(Pvalue1, ';',1,1)+1);
end loop;