Is there a way to code Dynamic SQL in a Forms 4.5 Trigger?

From: Sero2 <sero2_at_aol.com>
Date: 1996/02/04
Message-ID: <4f2gvr$grh_at_newsbf02.news.aol.com>#1/1


In PRO*C, there is a construct "EXEC SQL PREPARE" in which you can dynamically put together a SQL statement at runtime. I would like to do the same thing in a Forms 4.5 trigger, but don't see any documented method to accomplish this.

The trigger needs to dynamically select from different tables based on criteria that can only be determined at runtime. My PL/SQL does allow me to pass the key which is used in the where clause, but will not work if I pass the table name, as shown in the following example.

declare
  cursor part_tool (the_key number,

                           the_table varchar2) is
    select tool_num, x.objectnbr
      from the_table t, part_object x
     where partnbr = the_key
       and t.objectnbr = x.objectnbr;

begin

I get an error stating that table "the_table" does not exist. (I have since discovered that the PL/SQL manual specificly states I can't do this)

Anybody have any ideas? (without doing a user exit). Received on Sun Feb 04 1996 - 00:00:00 CET

Original text of this message