September 20, 2007 at 4:14 am
Hi Everybody,
I had small confusion plz clarify any body plz
See i am creating one stored procedure in that i am created three triggers inser,update,deleted.
How can i know which Trigger is fired right know? can u plz any body explain me plz
Thanks & Regaurds
subu
September 20, 2007 at 5:09 am
Sorry, subu, I don't get it... are you creating triggers inside of stored procedure? Or are they already present in your table and the procedure should fire them? What "fired right now" means?
September 20, 2007 at 5:58 am
HI
In my procedure 3 Triggers is there insert,update,delete
Which trigger is fired right know
How can i know insert trigger is fired right know can u plz help me
explain me plz
Thx
subu
September 20, 2007 at 6:14 am
Insert trigger is fired every time when you insert into the table.
If you want to know when it was fired, make column date_created in your log table. Then make the trigger insert current date into it, like this:
INSERT INTO log_table (col1, col2, date_created)
SELECT somecolumn1, somecolumn2, GETDATE()
FROM inserted
Then if you look at the log table, you will see when the trigger was fired. Is that what you need?
September 20, 2007 at 7:52 am
Hi Vladan,
What is Log table? What is the use of that logtable in ms sql server can u plz tel me
Thank u very much ur reply
bye
September 20, 2007 at 8:23 am
Log table is just MY name for a table into which you insert rows from a trigger. It is not a system table. You did not post the trigger, so I don't know what is the name of table where it inserts.
I'm really sorry, but the language barrier is too big - we don't understand each other. I still don't know what you need and you don't understand what I am saying.
September 20, 2007 at 10:00 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply