Trigger prob

  • 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

  • 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?

  • 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

  • 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?

  • 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

  • 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.

  • Can you post your procedure?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply