Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic sql (built on the fly)

Re: Dynamic sql (built on the fly)

From: Chris Weiss <weisschr_at_pilot.msu.edu>
Date: Wed, 30 Jun 1999 12:13:45 -0400
Message-ID: <7ldfod$gfd$1@msunews.cl.msu.edu>


If you are using Oracle 8i, try using the execute immediate command for dynamic SQL. Dynamic SQL is much simpler, cleaner and faster under 8i than using dbms_sql.

Christopher Weiss
Professional Services Division
Compuware Corporation

Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> wrote in message news:930736111.15611.0.nnrp-13.9e984b29_at_news.demon.co.uk...
> It's a little (lot ?) harder than that, because when
> you select you need to bind the results to
> output variables; so if the select list is not
> strictly limited, you need
> (a) a load of 'available' variables to select into
> (b) an input which lists the types, and order of the selected columns
> (c) a method for executing the correct bind and values calls
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: www.jlcomp.demon.co.uk
>
> Mark G wrote in message <3779de73.0_at_145.227.194.253>...
> >
> >First of all, you need to save your query in a string
> >
> >e.g v_string := 'Select ......'
> >
> >You can add your user supplied search criteria as well
> >
> >e.g v_string := 'Select ' || v_column || ' from ' || v_table);
> >
> >Once you have your string, pass v_string into the DBMS_SQL package. See
> any
> >good PL/SQL book for the dbms_sql commands
>
>
>
Received on Wed Jun 30 1999 - 11:13:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US