View Single Post
  #1 (permalink)  
Old July 8th, 2003, 01:21 AM
NK NK is offline
Registered User
 
Join Date: Jul 2003
Location: Centurion, Guateng, South Africa.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default New line in concatenated field

HI
I have a query which populates a field by concatenating few other fields. For each field concatenated, the value should be displayed in a new line.

An example
SELECT 'INSERT INTO Table1(
Title) values
(''Name: ' + ForeName + ' Surname: ' + SurName + ' Title: ' + Title +);'
FROM Table2
This returns
INSERT INTO Table1 (title) values (Name: XX SurName: YY Title: ZZ)

Is there a way enough space is created between each concatenated field so that they get displayed in new lines
Name: XX
SurName: YY
Title: ZZ

rather than Name: XX SurName: YY Title: ZZ

Char (13) does not seem to help.

Thanks
Nimisha