Solved

Adding a CRLF to a Select query?

Posted on 2007-04-09
4
845 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

724 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