SQL Server Performance

Sending Email Based On Insertion of Record

Discussion in 'General DBA Questions' started by scrappy, Jan 31, 2003.

  1. scrappy New Member

    Hello All

    I'm trying to figure how I can send an email to someone based on a record being inserted into a particular table. My scenario is this. I want to send an email to a technician everytime a work order is created in the database for that technician. Each new record has a status of ASSGN when first created. Is there anyway to send an email based on this status when it's first entered into the work order table?

    Thanks
    KH
  2. HarryArchibald New Member

    You could add a trigger to the that checks that the status has been inserted, and use xp_sendmail to e-mail a record.
  3. bradmcgehee New Member

    HarryArchibald's recommendation is the standard solution to this issue.

    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com
  4. scrappy New Member

    quote:Originally posted by HarryArchibald

    You could add a trigger to the that checks that the status has been inserted, and use xp_sendmail to e-mail a record.

    Thanks for the response, I'm new to the server side so I'm investigating some examples of triggers that will help me with the problem. I will go in the direction you mentioned. Thanks again.
  5. scrappy New Member

    quote:Originally posted by bradmcgehee

    HarryArchibald's recommendation is the standard solution to this issue.

    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com

    I will need to research the trigger aspect, I'm new to writting triggers of that nature. Thanks for the response.
  6. satya Moderator

    Why not check MS NOTIFICATION SERVICES release recently, I don't the link currently and have seen earlier in MS website.

    HTH

    Satya SKJ
  7. scrappy New Member

    thanks for the hint, I will research it tonight.

Share This Page