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)
 creating carriage returns in a sql insert

Author  Topic 

plocke
Starting Member

15 Posts

Posted - 2001-05-25 : 21:12:05
I want to create a some text and put it into a field in a sproc. I need to insert carriage returns so i can sent the content via. email easily.

so is there a character to indicate a linefeed? all i know is vbCrLf but that of course does not work.


DECLARE @Body_Content varchar(100)
DECLARE @User_Name varchar(100)

Set @User_Name = 'Bill Wilkinson'

Set @Body_Content = 'Confirmation Email ' + vbCrLf
Set @Body_Content = @Body_Content + 'Dear ' + @User_Name + 'vbCrlf'

Select @Body_Content
Insert into Tablename(body_content)
Values(@Body_Content)


   

- Advertisement -