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

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored Procedure - Datatype Issue

Author  Topic 

MaverickUK
Yak Posting Veteran

89 Posts

Posted - 2003-05-22 : 06:11:44

Hi guys

I've got a stored procedure which runs once a day and builds up a list of 404 errors logged by our website. It compiles this data into an e-mail, which it then sends off to a set of people.

The issue is, I'm building up the body of this e-mail in a VARCHAR(8000) variable. But sometimes the e-mail body text is longer than this, which leads to e-mails being send with the bottom part cut off.

I know what I can't use TEXT as a datatype in a stored procedure, what are my other options?

Thanks

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-05-22 : 06:43:31
Split it up into more than one mail?

Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-22 : 06:44:15
Put your errors into a table and use the @query argument of xp_sendmail to construct a query that selects from the table.

Jay White
{0}
Go to Top of Page

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-05-22 : 06:45:35
Yeah that's so much better than my suggestion. Didn't think of it :)

Go to Top of Page
   

- Advertisement -