Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to Send Result in a Table Format
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vinurvk
Starting Member

8 Posts

Posted - 12/15/2010 :  05:16:19  Show Profile  Reply with Quote
How to Send Result in a Table Format via sp_send_dbmail..

I want to populate a table result - say Select * from User_List within the email which gets triggered via sp_send_dbmail.

The above statement will retrieve 5 rows and 3 columns.
I tried so many forums and everyone is suggested xml querying which am aware of.

vinurvk
Starting Member

8 Posts

Posted - 12/15/2010 :  05:24:35  Show Profile  Reply with Quote
EXEC sp_send_dbmail @profile_name='Mailer',
@recipients = 'vin@abc.com',
@subject='User Details',
@from_address ='Reporting@abc.com',
@body_format = 'HTML',
@query='select * from users_list'

-
When i do this am getting the result inside the mail without any alignment.
Is there a possible to populate the data into a HTML Table format..
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000