?
Solved

Adding a CRLF to a Select query?

Posted on 2007-04-09
4
Medium Priority
?
858 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:Saqib Khan
ID: 18877138
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 200 total points
ID: 18877353
CRLF is CHAR(13) + CHAR(10)
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 18877365
>>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
ID: 18877770
Once I added them both in I got what I was after.

Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

840 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