Link to home
Start Free TrialLog in
Avatar of pauldonson
pauldonson

asked on

How to add a carriage return in SQL VarChar field

I have a stored procedure:

Declare @address as varchar(250)

set @address = @address + 'Address Line 1' + char(13)  --char 13 being the code for a Return character
set @address = @address + 'Address Line 2' + char(13)
...etc

When I insert this variable into a varchar field in a SQL table and then generate a report using MS Access from it  I just get little squares where the new lines should be.

Is there an equivalant in SQL to the VBA "vbcrlf"?
ASKER CERTIFIED SOLUTION
Avatar of jchopde
jchopde

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pauldonson
pauldonson

ASKER

Fantastic! Thanks for the quick response