Results 1 to 8 of 8

Thread: SQL Trigger

  1. #1
    Join Date
    Jan 2008
    Posts
    20

    Unanswered: SQL Trigger

    Hi All

    I am looking for a basic script example on how to write an After Insert
    Trigger to allow multiple row inserts. Is it possible to e-mail the values
    inserted when the trigger execute.

    Thank You!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Yes it's possible, but I advise against it!
    Why would you want to email the values of an insert statement anyway?!
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Can I have one that makes coffee?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Do not use a trigger to send e-mails.
    If you have to send e-mail alerts, use the trigger to populate a queue table and then have a scheduled job that checks the queue table for new data and sends out the alerts.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by Brett Kaiser
    Can I have one that makes coffee?
    You are freakin' me out lately, Brett.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by blindman
    You are freakin' me out lately, Brett.
    He's still got it!
    George
    Home | Blog

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by blindman
    You are freakin' me out lately, Brett.
    What do you mean LATELY???

    -PatP

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    I've seen much more unreasonable requests than that
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •