Re: Find out the table name inside the trigger code

  • From: Martic Zoran <zoran_martic@xxxxxxxxx>
  • To: 'Oracle-L Freelists' <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 13 Dec 2004 05:50:07 -0800 (PST)

Stephane,

Thanks a lot.

That will do it :)
But I am not going to do it, because it is more
complicate then just fix the name in the triggers.

It is easier to create the dynamic SQL to create the
triggers then to do this :)

The ugly thing is that I missed the chapter in the
docs describing these special ora_... env variables.
But, what I can do, just continue learning.

Cheers,
Zoran Martic



--- Stephane Faroult <sfaroult@xxxxxxxxxxxx> wrote:

> What I would suggest you is to use ora_sql_txt and
> "parse" the text. It's fairly
> easy to locate the tablename at the beginning of an
> Insert/Update/Delete
> statement, the only trick is probably to get rid of
> comments and hints.
> That said I would have no problem with hard-coding -
> as long as I generate the
> code ...
> 
> Regards,
> 
> Stephane Faroult
> 
> RoughSea Ltd
> http://www.roughsea.com
> 
> 
> On Mon, 13 Dec 2004 02:09 , Martic Zoran
> <zoran_martic@xxxxxxxxx> sent:
> 
> >Hi,
> >
> >Is it possible to find out the table name in the
> >trigger code at execution time?
> >
> >Cannot figure out any possible way.
> >
> >Not crazy important but interesting if you want the
> >trigger code across many tables to look the same
> >(stupid, but anyway :)
> >
> >The solution can be some environment variable or
> the
> >custom SQL) or wahetever, just to not hard code the
> >name of the table/trigger if possible :)
> >
> >Thanks in advance.
> >
> >Regards,
> >Zoran Martic
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >--
> >//www.freelists.org/webpage/oracle-l
> 
> 
> 
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
--
//www.freelists.org/webpage/oracle-l

Other related posts: