Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send emails with a resultset

Status
Not open for further replies.

jdgonzalez

Programmer
May 11, 2004
72
US
Hi everyone,

I'm hoping someone in the community can help me out with something. I've got a stored proc that returns a resultset. Here's where I'm stuck. I want to insert the results into an email. I used xp_sendmail with @query, but the formatting was terrible. How can I make the output better looking preferably something I can embed HTML.

Would I use a cursor in this case as I'll have better control of what is happening row by row?

My stored proc returns:
issue_id, cust_name, sts_name and sla_sts

Any help would be greatly appreciated
 
Try the @attach_results paramter ... It sends the query as an attachment.. txt file.

Check the spelling and name of the parameter, but it should pointyou in the right direction.


Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top