Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Email Row By Row

$
0
0

Hi Experts ,

I have table named Customer with columns namely FirstName,LastName,Email , Priority & Date

Every Monday i need to mail out individual record to the respective customer listed in the table .

Like if my first record is Ron,Zengrake ,Ron.Zengrake@xyz.com, Critical ,06-12-2014.

So i need to send an email to ron using the email address in the table with the entire record in the email body .

I have an idea to send emails using the sql agent in html format . Only confusion is how to send out emails to all the customer in the table one by one based on the current date .

Any record  Date column = Monday Date then send an email to those customer .

So suppose today is monday and date is 06-12-2014 . So from the below data i need to send an email to just 2 records

separately. 

Records with First Name : Ron and Zack just ... Their entire row data needs to be mailed using the Email from Email column.  There could be 1000 records in real case scenario so email needs to be send row by row where the date matches the whatever Monday date is .

Please let me know if some other detail is also required

Thanks

Priya

FirstName LastName Email Priority  Date
Ron Zengrake Ron.Zengrake@xyz.com High 12-06-2014
Zack  BenZack.Ben@xyz.com Low 12-06-2014
Troy  FoldTroy.Fold@xyz.com Medium 10-06-2014
Jim  LawJim.Law@abc.com High 10-06-2014


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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