Forum Discussion

AravindanR's avatar
AravindanR
Occasional Contributor
8 years ago

Use of array variables in PL SQL script executed from JDBC request

I am using an array variable in the PL SQL as below:

DECLARE

TYPE testID IS VARRAY (10) OF TESTTABLE.TESTCOLUMN% TYPE;

testArray              testID := testID(:Arrayvaluefromproperty);

 

BEGIN

FOR i IN 1..testArray.count LOOP
    INSERT INTO TESTTABLE

(TESTCOLUMN)

values

(testArray(i))

END LOOP;

 

I populated the value in the properties for Arrayvaluefromproperty as 'test1',test2'

 

I was expecting two rows in the table as

test1

test2

 

but I am seeing a single row with value

'test1','test2'

 

Please help me to overcome this issue

 

 

No RepliesBe the first to reply