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: LONG to varchar2

Re: LONG to varchar2

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 13 May 2003 17:07:27 GMT
Message-ID: <MPG.192ac62619c6bcc798977f@news.la.sbcglobal.net>


bob_at_dpsp-yes.com said...
> "Gary Avery" <Gary.P.Avery_at_Pharmacia.com> wrote in message
> news:3ec1153e$0$9507$1406d58a_at_newsread.pharmacia.com...
> > HELP!!
> >
> > I'm having alot of difficulty in finding out how to convert a long datatype
> > (which only contains text) to a varchar2. If this is too difficult can
> > anyone suggest a method of removing any chr(10) and chr(13)'s from a long
> > datatype.
> >
>
> LONGs are the most unusable data type ever been implemented in Oracle.
> You can't do almost anything with them server-side. Migrate to CLOBs
> asap. Oracle made every effort to make transition to LOBs smooth and
> painless, so take advantage of it and forget about LONGs. To migrate in
> pre-9.2, use TO_LOB() function along with CREATE TABLE AS SELECT
> or INSERT INTO SELECT to migrate your LONGs, and in 9.2 you can
> simply ALTER TABLE MODIFY (long_column {C|B}LOB [LOB storage]) to
> migrate them in place.
>

In addition to what Vladimir said, you might want to check out the following Ask Tom site, which contains several examples (will probably wrap):

http://asktom.oracle.com/pls/ask/f?p=4950:8:1090762::NO::F4950_P8 _DISPLAYID,F4950_P8_CRITERIA:510622111991,

-- 
/Karsten
DBA > retired > DBA
Received on Tue May 13 2003 - 12:07:27 CDT

Original text of this message

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