0

I would like to know if possible and how I would achieve the following, whenever a new row is inserted into the following table (Contact) and the Confidential_flag Column has “Y” an email is sent to a user.

im unable to upload an image of the data but bellow is my select statement

SELECT NAME_DIWOR, CONFIDENTIAL_FLAG, SURNAME, COMM_NO, ADDRESS, ConTACT_TYPE, CLIENTCODE FROM CONTACT

Thank you

2 Answers2

0

You can use a Triggers to fire events and perform some action when data is inserted, updated, or deleted from a table and use xp_sendmail stored procedure can be invoked to send an email. This link explain more details how get this goal.

http://www.datasprings.com/resources/articles-information/creating-email-triggers-in-sql-server-2005

danywalls
  • 709
  • 1
  • 10
  • 27
0

Create a trigger on the table, that sends out an email whenever an insert happens.

See here for more information.

Community
  • 1
  • 1
bastos.sergio
  • 6,684
  • 4
  • 26
  • 36