Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello, Does anyone know how to i 3

Status
Not open for further replies.

codehead

Programmer
Aug 25, 1999
96
US
Hello,

Does anyone know how to insert a carriage return into a field on Oracle. For example:
'This is the first sentence.

This is the second sentence, which comes after a blank line.'

We have an application that can do it (only on the fields included in the app), but I can't figure out the syntax to do it in straight SQL.

Thanks.

Codehead


 
To insert a CR into a field you can use concat('TEXT',CHR(015)).Does this help? SOL
The best thing about banging your head against a wall is when you stop.
 
Sorry mine should of been CHR(013) I was in octal. 10 is line feed isn't it? SOL
The best thing about banging your head against a wall is when you stop.
 
Thanks everyone.

I had to modify it some to get what I needed:

concat(concat(concat('TEXT',CHR(10)),CHR(10)),'TEXT').

Any ideas on how to simplify this (I have to put in about 10 of these breaks into a page of text)?

Thanks again.

Codehead
 
Use the double pipe:

'text'||chr(10)||'text'||chr(10).....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top