Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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

  #2 (permalink)  
Old July 15th, 2003, 10:27 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please Type chr(10)

scott@PRD.COM> select 'Name:XX'||chr(10)||'SurName:YY'||chr(10)||'Title: ZZ' aa from dual ;
AA
------------------------------------------------------
Name:XX
SurName:YY
Title:ZZ


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a blank line to a memo field Scootterp Access VBA 3 October 31st, 2006 01:15 PM
parsing concatenated strings? poobaah Beginning PHP 4 October 28th, 2004 02:40 AM
line breaks in MySQL field? Tachyon PHP Databases 3 May 21st, 2004 06:03 PM



All times are GMT -4. The time now is 01:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.