Solved

Create a trigger to send email notification

Posted on 2006-11-23
1
338 Views
Last Modified: 2012-05-05
Hello experts, I would like to send an email notification to an employee when their car mileage has been approved, but I don't know if this can be done using a trigger.

I have a table CAR_MILEAGE_CLAIM and when the field MGR_APPROVED is updated to 'Yes' i would like to send an email notification to the employee, the email address is in the field EMPLOYEE_EMAIL

Here's what I'd like the email to be: (microsoft outlook 2000)

To: [EMPLOYEE_EMAIL]
Subject: Car Mileage Confirmation & Date
Body: I can add blurb later


Thanks, DomiLama
0
Comment
Question by:DomiLama
1 Comment
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 18003931
check examples:
Implementing Triggers in SQL Server 2000
by Navneeth Diwaker Naik
http://www.sql-server-performance.com/nn_triggers.asp

----
CREATE TRIGGER

http://msdn2.microsoft.com/en-us/library/aa258254(SQL.80).aspx
----
xp_sednmail

http://msdn2.microsoft.com/en-us/library/aa260697(SQL.80).aspx
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now