dbTalk Databases Forums  

Referencing records field without hard-coding its name in PL/SQLcode

comp.database.oracle comp.database.oracle


Discuss Referencing records field without hard-coding its name in PL/SQLcode in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
m_mis
 
Posts: n/a

Default Referencing records field without hard-coding its name in PL/SQLcode - 07-12-2005 , 10:02 AM






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.

Reply With Quote
  #2  
Old   
Jim Kennedy
 
Posts: n/a

Default Re: Referencing records field without hard-coding its name in PL/SQL code - 07-12-2005 , 09:48 PM







"m_mis" <mPODKRESLENIEmis (AT) friko6 (DOT) onet.pl> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.