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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linefeed in data field results in multiple output records

Status
Not open for further replies.

sayetta

Programmer
Oct 23, 2000
4
US
Hi, using 8i (8.1.7) ... one of the fields in my table (it's varchar2) sometimes contains a carriage return or linefeed (or both?) that has been entered by the user. When doing a simple SELECT on this field, I get multiple lines in the output.

I know there must be a way to prevent this, because when I use Business Objects to report on the field, I don't have this problem. The same SQL is being generated, but there MUST be some setting that I'm not aware of. NOTE: I'm setting linesize to 10000 and the varchar2 field is smaller than that, so I assume that setting is not the problem.

Thanks!
 
I don't know of any setting, but you could use
Code:
SELECT   replace(replace(column_name, chr(10), ' '), chr(13), ' ') column_name, ...
to get rid of the CR and linefeeds
 
I think I was being dense! I'm viewing the output in an editor and I think the editor is breaking up the line when it encounters the linefeed. I think Oracle is not doing anything undesirable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top