Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic sql (built on the fly)
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
![]() |
![]() |