How to add multiline text in varchar(MAX) field
I have created varchar(MAX) field as memo field. Unfortunately I do not find a way how to add multiline text into such field using MS SQL Server Management Studio. If I use copy/paste of multiline text only first line of multiline test is inserted 开发者_运维问答into varchar(MAX) field.
As you observe, if you paste in multi-line text only the first line is inserted, instead paste the text into an update statement and run that;
update T set fld =
'aaa
sss
ddd'
where ...
(You need to SELECT
in results to text mode to observe the lines, in the grid view they appear as double-spaces)
You can use REPLACE('Line1@Line2@Line3', '@', CHAR(13) + CHAR(10))
, for example.
did you try ALT+ENTER.. this should add a new line
精彩评论