msdb.dbo.sp_send_dbmail

  • 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.

    😛

    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

  • 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

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply