all groups > sql server mseq > december 2003 >
You're in the

sql server mseq

group:

Emailing Reports using xp_sendmail


Emailing Reports using xp_sendmail Chris Preslar
12/23/2003 5:12:23 AM
sql server mseq:
I am trying to email three reports in a single email. I
have written a TSQL stored procedure the mixes print
statements and select statements to display a report. The
stored procedure works fine in query analyzer. However,
when I specify this stored procedure as the sql in
xp_sendmail, the results do not show up in the right place
in relation to the print statements. For instance, the
heading information set out with print statements for the
second result set appears in the emailed results before
the actual data from the first query. I have tried
everything but cannot get the results to appear in the
right place. Again, everything works fine in query
analyzer.

Thanks,
Re: Emailing Reports using xp_sendmail Ray Higdon
12/23/2003 9:19:40 PM
You might consider using a DTS package for this. I have used something like
this before to throw data to an excel spreadsheet and email the spreadsheet
daily (using Xp_sendmail).

HTH

--
Ray Higdon MCSE, MCDBA, CCNA
---
[quoted text, click to view]

AddThis Social Bookmark Button