Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Method 4 of Dynamic SQL
In article <Pine.GSO.3.96.970730163433.8002A-100000_at_sol10>,
ppgg_at_sol10.lcc.uma.es says...
>
>Hello!
>
>Method 4 of Dynamic SQL accepts and proceses queries when we don't know
>the number of select-list columns until run time.
>
>I have some questions about it:
>
>1.- Is it possible to use Method 4 of Dynamic SQL inside a PL/SQL
>subprogram? or is it only possible in embedded SQL?
>2.- How can I do that?
>3.- How can I declare a data structure of SQLDA type (SQL Descriptor Area)
>in PL/SQL?
>
>In negative case:
>
>4. Can I write de select command in a file and execute this file from the
>PL/SQL program (like from SQL*PLUS: @file), obtaining the results as in
>SQL*PLUS ?
>
>I will be very grateful if you can help me. Thanks.
>ppgg_at_lcc.uma.es
>http://www.lcc.uma.es/personal/ppgg/galindo.html
>
PL/SQL also supports a version of dynamic SQL. While it does not look like method 4 in PROC, I have used to to create SQL statements on the fly when I don't know in advance how many and which columns I will need. In version 7.3, it is documented in the Application Developer's Guide (Chapter 10). It has been available since at least 7.1 where is was documented in the Documentation Addendum. It should do what you want.
Good Luck
Rona Crystal
-- ===================================================================== Note: My email address has been modified to discourage unsolicited commercial and offensive email that is sent by bulk mailers. To respond personally to this post, remove all strings beginning and ending with #. i.e. j#xx#doe_at_my#yy#comp.com becomes jdoe_at_mycomp.com --------------------------------------------------------------------- All opinions expressed here are mine alone and do not reflect the opinion of any other individual or organization. =====================================================================Received on Mon Aug 04 1997 - 00:00:00 CDT
![]() |
![]() |