Problem solve Get help with specific problems with your technologies, process and projects.

Sending mail about row changes with SQL Mail

We are using version 7.0. User data, including mail ID, are stored as rows with a unique number as a primary key. Basically the idea is to send a mail to the user when one or more entries in the row changes. We use the built in feature of SQL Mail for this. There is also a trigger in place which is supposed to handle this. We have developed a code which works but the trouble is that it sends a mail to the mail id in the bottom most row! So we have have worked out a roundabout method by creating a temporary table at run time and then deleting it after the mail send event. I am just wondering if there is a regular way to get around this problem.

Let me guess.....you have something that looks like the following:

 Select @var = column from table
You are trying to stuff multiple values into a scaler variable. Only the last value will be retained.


For More Information

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.