Home > Archive > Oracle Databases > July 2005 > Re: Referencing records field without hard-coding its name in PL/SQL code









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Referencing records field without hard-coding its name in PL/SQL code
Jim Kennedy

2005-07-13, 3:24 am


"m_mis" < mPODKRESLENIEmis@fri
ko6.onet.pl> wrote in message
news:db0m3g$cas$1@at
lantis.news.tpi.pl...
> is there any possibility to reference a record field in PL/SQL code, not
> hard-coding it name
>
> e.g.
> i`ve got a ':new' record in a trigger and an array of varchar2 ` s -
> this records fields names.
> can access this record via names from the table ?
>
> i mean something like
>
> :new.get( 'fieldname' )
> :new[ fieldnumber ]
>
> anything.
>
> thanks in advance for any response.

I can't think of a way to do it in a trigger to be able to reference :new.
These are local variables to the trigger. If you did it in the way you
indicate then you would probably generate a lot of hard parses. This would
eat up a lot of CPU and a lot of latching.
Jim


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com