Re: Need help for dbms_sql pack.

From: Scott Urman <surman_at_dlsun338.us.oracle.com>
Date: 1996/12/17
Message-ID: <596tpm$h00_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <59488e$kqa_at_rc1.vub.ac.be>, infodocb_at_vub.ac.be (INFODOC 2 lic) writes:
|> Did anybody already succeeded in passing an ENTIRE 'select' statement
|> as the parameter of a procedure using the dbms_sql package ?? Is this
|> possible ?

You can do this, but it will take a bit of work. Plus, there are a couple of ramifications of using DBMS_SQL:

  1. The biggie is that DBMS_SQL has no describe ability. You can't dynamicly determine the datatypes and lengths of the select list items. You can, however, query the data dictionary directly to find this information. The DBMS_DESCRIBE package will likely be helpful for this as well.
  2. Coupled with this is the decision of how to output the results. Unfortunately, DBMS_SQL and cursor variables are not hooked up as of yet. So you have to have storage allocated to receive the results.

For more information, see the _Application Developer's Guide_, or Chapter 10 of _Oracle PL/SQL Programming_ (info below). Hope this helps!

|>
|> Thanks a lot in advance for any help !!
|> Regards,
|> Sebastien RIGAUD
|> sebastien.rigaud_at_dg12.cec.be



Scott Urman Oracle Corporation surman_at_us.oracle.com

Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm

"The opinions expressed here are my own, and are not necessarily that of  Oracle Corporation"
Received on Tue Dec 17 1996 - 00:00:00 CET

Original text of this message