Re: Resolving variable as a column name...
From: Lun Wing San <wslun_at_qrcsun.qrc.org>
Date: 1996/11/19
Message-ID: <32920159.1026_at_qrcsun.qrc.org>#1/1
Date: 1996/11/19
Message-ID: <32920159.1026_at_qrcsun.qrc.org>#1/1
Kurt Lee Harless wrote:
>
> Help!
>
> Have created a stored procedure that is fired by a before insert trigger and
> is passed the tablename from which fired it. This procedure then does a look
> up of the columns that are in that table and stores them in an array.
>
> I would like to then reference the :new.colname values by dynamically
> resolving the reference as; :new.column_array(index), where
> column_array(index) contains a string that equals a column name in the table.
You can try to use dynamic SQL to implement it. The package for dynamic SQL is DBMS_SQL.
-- Name : Lun Wing San Title : Oracle developer of the Hong Kong Productivity Council System Administrator and Oracle DBA of the Quick Response Center Email Addr. : sunny_at_hkpc.org Telephone : 852-2788-5841Received on Tue Nov 19 1996 - 00:00:00 CET