dbTalk Databases Forums  

email query results

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss email query results in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JT
 
Posts: n/a

Default email query results - 08-04-2004 , 09:27 AM






how can i create a dts package to do the following:
1) execute a query once a day at a specified time,
2) either put the query results into the body of an email or output to a
file and attach that file to an email message
3) email the file

tia
jt



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: email query results - 08-04-2004 , 10:02 AM






Some options-

xp_sendmail - supports mail and use @query parameter to pass in your query.

xp_smtp_sendmail (http://www.sqldev.net) - more reliable mail, but no @query
support. I use sp_makewebtask to create a HTML file which I use as the body
of the email, as xp_smtp_sendmail supports this. Can get some nice formatted
mails with tables in like this.

Use DTS to create a file of query output, and use either of the above or the
DTS Send Mail task to send the mail.

Use SQL Server Agent to schedule any of the above options.

Use SQL Reporting Services. It has formatted query output aka a report,
schedules and email capabilities.


--
Darren Green
http://www.sqldts.com


"JT" <jt (AT) nospam (DOT) com> wrote

Quote:
how can i create a dts package to do the following:
1) execute a query once a day at a specified time,
2) either put the query results into the body of an email or output to a
file and attach that file to an email message
3) email the file

tia
jt





Reply With Quote
  #3  
Old   
Krip
 
Posts: n/a

Default Re: email query results - 08-07-2004 , 05:10 PM



Another option is to use Gadami. See http://www.kripsoft.com. It
supports sending queries as HTML tables in emails. Data can also be
attached as Excel spreadsheets. While you can tell Gadami to run the
query no more than once a day, you will need to use a scheduler to
actually run the program, like Windows Task Scheduler or SQL Agent.

-Krip

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.