Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic sql (built on the fly)
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
HTH Mark
huh wrote in message <7lcm1k$14ji$2_at_ns.felk.cvut.cz>...
>Hi,
>
>I'd like to know how can I build up
>the sql string
>(e.g.: select <list of columns according one variable>
> from <table name according another variable>)
>and execute it. Everything in PL/SQL.
>
>TIA
>
>--
>Thank you for keeping >anti-spam< habit:
>not including my address in your reply.
>
>
>
Received on Wed Jun 30 1999 - 04:18:09 CDT