Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Find out the table name inside the trigger code

Re: Find out the table name inside the trigger code

From: Martic Zoran <zoran_martic_at_yahoo.com>
Date: Mon, 13 Dec 2004 05:50:07 -0800 (PST)
Message-ID: <20041213135007.90658.qmail@web52607.mail.yahoo.com>


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

> 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_at_yahoo.com> 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
> >--
> >http://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
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 13 2004 - 07:45:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US