dbTalk Databases Forums  

How to assign values to a TEXT datatype in SQL

microsoft.public.sqlserver.mseq microsoft.public.sqlserver.mseq


Discuss How to assign values to a TEXT datatype in SQL in the microsoft.public.sqlserver.mseq forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
newbie
 
Posts: n/a

Default How to assign values to a TEXT datatype in SQL - 03-03-2004 , 07:20 AM






Hi all,

I have very email body content stored in database field whose data
type is text. I need to retrieve this value in side the stored
procedure , replace few parameters in the body with actual values and
then send the emails using CDONTS from within the stored procedure.


I'm able to read the email body using READTEXT , but i want to asign
this content to a text datatype so that i can finally send it to my
stored procedure to fire mail through CDONTS.

i want something of this type
declare @body as text

set @body = 'read here from database text field'

Email_CDONTS @from , @test_mail_to , '', '', @subject,@body,
@file_name, @priority

can i assign the value from text data type from database and put it in
a @body of text data type and send it to my stored procedure?

DECLARE @ptr varbinary(16)
DECLARE @photolength int
SET @photolength = (SELECT DATALENGTH(mail_body) FROM T_Mail

readtext T_Mail.mail_body @ptrval 0 @photolength

does not help me as i need to put the text in @body variable

Can i asssign it / Please help

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.