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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-07-04 : 08:36:20
|
| blueskybird writes "I try to use xp_readmail to read through the message, but I use the code your sqlguru given:DECLARE @hMessage varchar(255), @MessageText varchar(1000)EXEC xp_findnextmsg @msg_id=@hMessage OUTWHILE @hMessage IS NOT NULLBEGINexec xp_readmail @msg_id=@hMessage, @message=@MessageText OUTSELECT 'You''ve got mail! Here it is: ' + @MessageText EXEC xp_findnextmsg @msg_id=@hMessage OUTENDonly can get short message like "Welcome to Microsoft Outlook 2000 One Window to Your World of Information Microsoft(R) Outlook(R) 2000 is the premier messaging and collaboration client that helps you achieve better results by combining the leading suppor"but I want to get the whole message longer than 1000 characters, can we do that? How many characters @message has in xp_readmail?Thank you very much." |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2003-07-04 : 13:01:41
|
| @message is actually text so you can certaily change @MessageText to varchar(8000) if that will be sufficent otherwise insert the results of xp_readmail into a table with a text columnHTHJasper Smith0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27 |
 |
|
|
|
|
|