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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Upper, Longvarchar and RTF text

Re: Upper, Longvarchar and RTF text

From: Wazusa Blong <fitzjarrell_at_cox.net>
Date: Tue, 12 Jun 2007 11:18:55 -0700
Message-ID: <1181672335.577631.204460@g37g2000prf.googlegroups.com>


On Jun 12, 10:59 am, Sonnich Jensen <sonnich.jen..._at_jotautomation.com> wrote:
> On Jun 12, 4:41 pm, Wazusa Blong <fitzjarr..._at_cox.net> wrote:> Comments embedded.
> > On Jun 12, 4:56 am,Sonnich Jensen<sonnich.jen..._at_jotautomation.com>
> > wrote:
>
> > > I have this: select * from blaaah and upper(somefield) like '%EPLACED
> > > %'
> > I'm hoping this is a typographical error and you simply missed
> > pasting the WHERE clause ...
>
> ups... yep it is there, I cutted something out
>
>
>
>
>
> > > somefield is of type LongVarchar, and contains text in RTF format.
> > > We are looking for the text "Replaced", which in most cases is "R\f1
> > > eplaced".
> > My guess is this is a LONG datatype, as LongVarchar does not exist as
> > a type.
>
> > > The upper should help us out, for both "upper" and "like" I get an
> > > errors: expexted NUMBER got LONG.
> > > It is a longvarchar.
> > > Even select upper( the field) will cause that problem.
>
> > Yes, LONG does not behave as one might expect given the data it
> > contains. You'll need to convert this text to a varchar2 before you
> > can use upper() or
> > substr(). I would be looking into writing some PL/SQL code to do
> > this. If I remember correctly asktom.oracle.com has examples of this.
>
> You mean cast it or convert the table?
>
> I looked at that site but did not find anything.
>
> /S- Hide quoted text -
>
> - Show quoted text -

A question arises as to why you're still using LONG when other LOB datatypes exist?

David Fitzjarrell Received on Tue Jun 12 2007 - 13:18:55 CDT

Original text of this message

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