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)
 Retriving Data into variable

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-20 : 08:22:58
Brijesh writes "Hi...
I am on SQL 7.0 I want to mail data using CDONTS....now i want to mail incremental data
i want to send Result of sql query into a variable without any File I/O (bcp).
if it can be of Text data type (m sure it cant be so easy...) i can handle lots of data....



Waiting....



Thanks

Brijesh"

SamC
White Water Yakist

3467 Posts

Posted - 2003-05-20 : 08:31:15

How about

DECLARE @MyEmailBody VARCHAR (4000)

Select @MyEmailBody = 'Welcome: ' + Username + ' You have won this wonderful prize.'
FROM MyTable WHERE ...

Sam

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2003-05-20 : 12:25:35
or:
DECLARE @MyEmailBody VARCHAR (8000)

You can't use a text variable.

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page
   

- Advertisement -