Re: PLSQL Execute Immediate

From: CollyMitch <colmjmitchell_at_gmail.com>
Date: 22 May 2006 08:59:47 -0700
Message-ID: <1148313587.602712.245060_at_g10g2000cwb.googlegroups.com>


Cheers Steve,

I was daunted at first but I've created a procedure that I use to parse the comma separated string for a comma , and split it up and store each part in a table. I also create a string with concatenation characters:  a||','||b||','||c||','||d - I use this in my execute immediate statement to retrieve a comma seperated string of the data values - so the result I get is 'a123,b123,c2343,d4332'.

I then pass this string to the same procedure which again returns the table of the individual data. The insert is as simple as:

for i in 0... rowcount
  execute immediate 'insert into table2 (field_name, field_value)   values(:1,:2)'
  using fields_table(i), data_table(i);
loop

Thanks for you help guys!

Colm Received on Mon May 22 2006 - 17:59:47 CEST

Original text of this message