If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > How to get the sql statement that fired trigger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-03, 05:06
shreygour shreygour is offline
Registered User
 
Join Date: Dec 2002
Location: India
Posts: 5
Question How to get the sql statement that fired trigger

I want to read the sql statement in trigger by which trigger is fired. Can any one help?
Reply With Quote
  #2 (permalink)  
Old 07-01-09, 19:36
ridiculous ridiculous is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
叼你,竟然没人回复.
Reply With Quote
  #3 (permalink)  
Old 07-02-09, 08:50
aflorin27 aflorin27 is offline
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 317
Use these steps:
- suppose you have an INSERT trigger on table A
- then your statement is something like: INSERT INTO A(...) VALUES(...)
- query the <i>inserted</i> table and you will have the values
- eliminate the NULLs
- query the data dictionary (system tables) and you will have the field names
- you are now able to re-create the entire INSERT
- why do you need it?
__________________
Florin Aparaschivei
Iasi, Romania
Reply With Quote
  #4 (permalink)  
Old 07-07-09, 17:21
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 443
Quote:
Originally Posted by ridiculous
叼你,竟然没人回复.
Hi Ridiculous,

1) Please be aware this is an English site and state your posts in English.
2) I did a translate google and from what I can figure out, it says theres not a single person who responded to this thread for a long time.

Can you please clarify in English?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On