Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to handle varchar(4000) field containing carriage returns in reporting?

Re: How to handle varchar(4000) field containing carriage returns in reporting?

From: Mladen Gogala <mgogala.spam-me-not_at_verizon.net>
Date: Wed, 18 Oct 2006 01:18:35 GMT
Message-Id: <pan.2006.10.18.01.18.34.810398@verizon.net>


On Tue, 17 Oct 2006 01:37:26 -0700, Sameer wrote:

> Hello,
> I am having a Oracle database, the data in tables of which is being
> stored using a web application. One of the fields of a table is having
> varchar(4000) datatype.
> The data in this field is text which may contain carriage returns also.
> I have to create a report for this table. How to display this data
> properly in a report?
> I tried few things:
> Accessed the table using SQL Developer and pasted the query output in
> Excel.
> As the text contains carriage returns, it is being spread into one or
> more rows.
> How to handle this?
> What is the proper way to create report for such data?
> Please help.

select regexp_replace(long_varchar2_column,'\n',' ') from my_table;

-- 
http://www.mladen-gogala.com
Received on Tue Oct 17 2006 - 20:18:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US