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
 General SQL Server Forums
 New to SQL Server Programming
 How to use Varchar(max) field insert command?

Author  Topic 

paramu
Posting Yak Master

151 Posts

Posted - 2010-11-22 : 09:32:24
Hi,

Iam using Sql Server 2008. I want to insert multi line text into mytable....How to use the Insert Command pls...

My Data:- Text Lines below...
--------
"All the equipment shall be as per the descriptions in your mail offer # 20933331 dated 25-Apr-2009 as well as in every respect to the requirements."

For the above data how to use the Insert into mytable?

insert into mytable (mul_desc) values (????????)


Thanks

Paramu @ PARANTHAMAN

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-22 : 09:35:12
insert mytable (mul_desc) select 'All the equipment shall be as per the descriptions in your mail offer # 20933331 dated 25-Apr-2009 as well as in every respect to the requirements.'


but that's a single line?


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-22 : 09:36:02
quote:
Originally posted by nigelrivett

insert mytable (mul_desc) select 'All the equipment shall be as per the descriptions in your mail offer # 20933331 dated 25-Apr-2009 as well as in every respect to the requirements.'


but that's a single line?
Actually it doesn't make any difference - a multi-line varchar just has crlf's in it.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.



==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -