Solved

Adding a CRLF to a Select query?

Posted on 2007-04-09
4
799 Views
Last Modified: 2008-01-09
SELECT *, ISNULL(ClientInCareOf,'') + char(13) + ISNULL(ClientAddr1,'') + char(13) + ISNULL(ClientAddr2,'') AS ClientFullAddress FROM ClientTable(NOLOCK) WHERE RecID ='" & ReturnValue & "'

I can't seem to get this to work, what am I missing?

Thanks.
0
Comment
Question by:ApexCo
  • 2
4 Comments
 
LVL 23

Expert Comment

by:adilkhan
Comment Utility
Try this

"SELECT *, ISNULL(ClientInCareOf,'') + '<br>' + ISNULL(ClientAddr1,'') + '<br>' + ISNULL(ClientAddr2,'') AS ClientFullAddress FROM ClientTable(NOLOCK) WHERE RecID ='" & ReturnValue & "'"



0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
Comment Utility
CRLF is CHAR(13) + CHAR(10)
0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
>>I can't seem to get this to work, what am I missing?<<
Also, please elaborate what you mean by this.
0
 
LVL 8

Author Comment

by:ApexCo
Comment Utility
Once I added them both in I got what I was after.

Thanks.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now