Re: PLSQL Execute Immediate

From: SteveC <stevec_at_sfsu.edu>
Date: 18 May 2006 14:28:29 -0700
Message-ID: <1147987709.032149.218630_at_g10g2000cwb.googlegroups.com>


The DBMS_SQL dynamic sql package can do it -- but you wind up making multiple calls: first to define each column, then one call per column per row to retrieve the data. If you are processing many rows with many columns, it will be slow (At least it was in a Forms client/server environment.)

What I have done is select all the columns of data into a single concatenated string, separating each column value with an ETX character, chr(3). You can retrieve up to 4000 characters this way, and then write a routine to parse the string into its separate column values. It works with text (char and varchar2) columns, numbers and dates (need to add a to_char in the select for those).

If you need to retrieve more than 4000 characters per record, then you would need to either use dbms_sql, or adapt the process to retrieve multiple 4000-byte strings. Received on Thu May 18 2006 - 23:28:29 CEST

Original text of this message