Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dtrivedi
Posting Yak Master
153 Posts |
Posted - 2010-07-19 : 15:28:35
|
I need to create a query which emails each store their location information. So it's one email which has the store location information which is going to 37 indicidual stores with there own information.i think this is called email looping? am new at this so not too sure.so far i have the scrip to generate the email of the query results to email addresPLEASE HELP BELWO IS THE QUERY THAT I HAVE EXEC msdb.dbo.sp_send_dbmail@recipients = 'dtrivedi@musicarts.com',@body= 'BODY OF THE EMAIL' @query='SELECT [LOCATION],[CUSTOMER],[ACCOUNT],[CUSTOMER_NAME],[PHONE] FROM vw_PAST_DUE_LESSONS_EZPAY]' , @subject = 'EZ', |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|