Re: Dynamic SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/12/31
Message-ID: <34ab7ceb.6363850_at_inet16>#1/1


In forms, to do a dynamic select, I think you'll find create_group_from_query and populate_group_from_query to be very handy functions. They'll create a record group based on your query. You'll access it like a 2 dimensional array.

for any statement (insert/update/delete/create/drop/etc) forms_ddl is the right answer...

On Tue, 30 Dec 1997 07:49:22 -0800, Steve Johnson <robertoc_at_fyiowa.infi.net> wrote:

>You need to use either DBMS_SQL or FORMS_DDL. If you ever need to
>execute a dynamic select you'll have to use DBMS_SQL. FORMS_DDL can't
>return anything. DBMS_SQL is kind of tricky to use from within forms.
>If you need further help you can Email me direct.
>
>Steve J.
>
>Eric Veilleux - Ers wrote:
>>
>> I've made a form that let me navigate in the all_objects view in order
>> to see the tables, triggers, sequences and indexes, it works pretty good
>> execept that I wanted to be able to create new objects and drop new objects.
>>
>> I'm having a hard time doing so. I figured I could put the sql statment
>> into a varchar2 and then execute it (like in pro*c) but that dosen't work,
>> how could I execute something like this?
>>
>> sql_stmt varchar2(200) := 'drop ' || :all_objects.object_type || ' ' ||
>> :all_objects.object_name
>>
>> Eric Veilleux
>> eveilleu_at_ers.ca
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Dec 31 1997 - 00:00:00 CET

Original text of this message