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: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 30 Jun 1999 10:43:51 +0100
Message-ID: <930736111.15611.0.nnrp-13.9e984b29@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 - 04:43:51 CDT

Original text of this message

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