Quantcast
Viewing all articles
Browse latest Browse all 183685

Send email when Data is being inserted or changed in MS SQL Server table

I need a trigger to basically do the following -
When a new raw has been inserted the trigger to look at the CONFIDENTIAL_FLAG column and if the value is = 'Y' then then an email is sent with all the data from that raw to recipient. If an update occurs and again if the value in CONFIDENTIAL_FLAG column is changed to 'Y' then the email containing all data from the raw is email.
this is the select statement for table contact as shown -
SELECT
NAME_DIWOR, CONFIDENTIAL_FLAG, SURNAME, COMM_NO, ADDRESS, ConTACT_TYPE, CLIENTCODE
FROM CONTACT


Appreciate your help, I need a dummies walk through as I have no idea how to achieve this
Thank you.


Viewing all articles
Browse latest Browse all 183685


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>