Home > Archive > SQL Anywhere database > October 2005 > how get the table name in a trigger









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 how get the table name in a trigger
fancy_jackie

2005-10-27, 7:41 am

for example, have a trigger on a table t_temp, in the
trigger, i wanna get the table (where the trigger resides)
name, but how? for i wanna use trigger to generate log,
there may be many triggers on many tables.
Russ Fleming

2005-10-27, 7:41 am

not sure what your trying to do but..

select tname
from systriggers
where trigname = 'your trigger name' ;

<fancy_jackie> wrote in message news:435e4e15.6998.1681692777@sybase.com...
> for example, have a trigger on a table t_temp, in the
> trigger, i wanna get the table (where the trigger resides)
> name, but how? for i wanna use trigger to generate log,
> there may be many triggers on many tables.



Andrew Giulinn

2005-10-27, 8:23 pm

By using Google Groups to search these newsgroups, I found that a similar
question was asked and answered here:

http://groups.google.com/group/syba...ad0efc
87


It may help.

Cheers

Andrew

<fancy_jackie> wrote in message news:435e4e15.6998.1681692777@sybase.com...
> for example, have a trigger on a table t_temp, in the
> trigger, i wanna get the table (where the trigger resides)
> name, but how? for i wanna use trigger to generate log,
> there may be many triggers on many tables.



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