Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

msdb.dbo.sp_send_dbmail Expand / Collapse
Author
Message
Posted Wednesday, July 9, 2008 1:14 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, January 15, 2014 3:17 PM
Points: 61, Visits: 87
Hi
I am using msdb.dbo.sp_send_dbmail and the property @attach_query_result_as_file=1;

It works well..no issues with functionality..but the way the results are formatted in the attached file is not fine.
:P
Is there a way to over come this problem. It is fine if I can have the results in the body of the email and not as attachment.

Thanks
Post #531181
Posted Wednesday, July 9, 2008 3:00 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
Yeah, I found the results created that way less than useless.

What I do instead is query the results as XML, then put that in the body of the HTML e-mail, after conversion to an HTML table. There's probably a better way to do it, but this way I can control the layout, et al.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #531237
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse