I know formatting should be handled in the client app and not in SQL Server
but this is the situation I must develop in so any help would be
appreciated.
I'm running the following in Query Analyzer
USE Pubs
DECLARE @MessageSubject VARCHAR(50)
SELECT @MessageSubject = 'Report'
EXEC master.dbo.xp_s endmail 'me@mine.com',
@query = 'SELECT au_fname, au_lname from pubs.dbo.author s',
@subject = @MessageSubject
The results in my email look like:
au_fname au_lname
------------------- ----------------------------------------
Abraham Bennet
Reginald Blotchet-Halls
Cheryl Carson
I would like the results to be like:
First Name: Abraham
Last Name: Bennet
First Name: Reginald
Last Name: Blotchet-Halls
First Name: Cheryl
Last Name: Carson
Thanks
but this is the situation I must develop in so any help would be
appreciated.
I'm running the following in Query Analyzer
USE Pubs
DECLARE @MessageSubject VARCHAR(50)
SELECT @MessageSubject = 'Report'
EXEC master.dbo.xp_s endmail 'me@mine.com',
@query = 'SELECT au_fname, au_lname from pubs.dbo.author s',
@subject = @MessageSubject
The results in my email look like:
au_fname au_lname
------------------- ----------------------------------------
Abraham Bennet
Reginald Blotchet-Halls
Cheryl Carson
I would like the results to be like:
First Name: Abraham
Last Name: Bennet
First Name: Reginald
Last Name: Blotchet-Halls
First Name: Cheryl
Last Name: Carson
Thanks
Comment