Unix Technical Forum

Column size in emails generated using XP sendmail

This is a discussion on Column size in emails generated using XP sendmail within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, with some help today I was able to get my stored procedure running and have the results emailed ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2008, 03:46 PM
Mike K
 
Posts: n/a
Default Column size in emails generated using XP sendmail

Hi, with some help today I was able to get my stored procedure running
and have the results emailed to me. However, this is how its showing
up:
Accounting_Year WK_IN_FYEAR Location
GL_Account
Col Data Difference
--------------- ----------- ------------------------------------
----------
-------------------- -------------------- --------------------
2007 49 Test1
500-001
-2587872.0200 -2587872.0200 .0000
2007 49 Test2
500-001
-3344713.5000 -3344713.5000 .0000
2007 49 Test3
500-001

Is there anyway to line them up side by side properly? When i have two
colms selected the format comes out ok. Thanks for all the help
again!

Here is the sp:

CREATE PROCEDURE [dbo].[spEmailVariance]
(
@SubjectLine as varchar(500),
@EmailRecipient VARCHAR(100)
)
AS

DECLARE @strBody varchar(5000)
set @SubjectLine = 'Weekly Flash Update'
SET @strBody =

'Select statement'


exec master.dbo.xp_sendmail
@recipients= 'XX@XXXX.com',
@subject= @SubjectLine,
@query = @strbody

RETURN
GO
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 03:46 PM
Plamen Ratchev
 
Posts: n/a
Default Re: Column size in emails generated using XP sendmail

Take a look at the @width and @attach_results parameters of xp_sendmail.

HTH,

Plamen Ratchev
http://www.SQLStudio.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2008, 03:46 PM
Mike K
 
Posts: n/a
Default Re: Column size in emails generated using XP sendmail

On Dec 14, 7:52 am, "Plamen Ratchev" <Pla...@SQLStudio.com> wrote:
> Take a look at the @width and @attach_results parameters of xp_sendmail.
>
> HTH,
>
> Plamen Ratchevhttp://www.SQLStudio.com


You are awesome! That works... I didnt use the @attach_results TRUE
because i was getting a system error. I used @width set to 170 and
that worked fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com