Just when I thought I was done... (:-))
Thanks, David, I'll make the change.
Rita
-----Original Message-----
From: David Cameron [mailto:dcameron@i...]
Sent: Thursday, October 11, 2001 4:56 PM
To: sql language
Subject: [sql_language] RE: Insert NewLine Into Comment Column
It would be better to use Char(10) + Char(13). It is more normal to use a
carriage return line feed pair for a new line. For example the vb constant
vbcrlf is made up char(10) & Char(13). Also there is another solution, which
is better it you have had to do some string manipulation to split out the
sentences into separate variables.
SET @Var = REPLACE(@Var, '.', '.' + CHAR(10) + CHAR(13))
This could give you problems if people have been using '.' inside sentences,
but if you were parsing the string you would have these problems anyway.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Rita Greenberg [mailto:rg1@h...]
Sent: Friday, 12 October 2001 7:08 AM
To: sql language
Subject: [sql_language] RE: Insert NewLine Into Comment Column
Hi Elmer. Thanks for the code.
I landed up using @MyComment = @Sentence1 + char(10) + @Sentence2
-----Original Message-----
From: Elmer Donavan [mailto:Elmer.Donavan@u...]
Sent: Thursday, October 11, 2001 12:27 PM
To: sql language
Subject: [sql_language] RE: Insert NewLine Into Comment Column
Define CRLF as CHR(10)& CHR(13)
switch I Set @MyComment = @Sentence1 + @Sentence2
to
Set @MyComment = @Sentence1 & CRLF & @Sentence2
Hope this helps.
-----Original Message-----
From: rg1@h... [mailto:rg1@h...]
Sent: Thursday, October 11, 2001 4:05 PM
To: sql language
Subject: [sql_language] Insert NewLine Into Comment Column
Hi.
I have a Comment VarChar(1000) column. I need to set it to several
sentences. How do I place a NewLine after each sentence?
e.g. @Sentence1 = "Today is Thursday."
@Sentence2 = "It's very warm in California."
I have a variable @MyComment VarChar(1000).
I Set @MyComment = @Sentence1 + @Sentence2
@MyComment now has:
Today is Thursday.It's very warm in California.
I need @MyComment to look like:
Today is Thursday.
It's very warm in California.
TIA
Rita