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: BLOB

Re: BLOB

From: Peter van Rijn <p.vanrijnREMOVE_at_THISzhew.nl>
Date: Thu, 31 Oct 2002 15:07:23 +0100
Message-ID: <us2ee3e3776ib2@corp.supernews.com>


Just discovered the function will return 0 if the BLOB has been initialized by the empty_blob function, otherwise it will NULL (when empty).

Peter

"Dirk Tschentscher" <dirk.tschentscher_at_volkswagen.de> schreef in bericht news:aprbrv$ol54_at_doiweb4.volkswagen.de...
> Hi Peter,
> I tested it before I wrote...
>
> The table is
>
> CREATE TABLE td_werte_anlagen
> (
> wert_id NUMBER(*,0) NOT NULL,
> inhalt BLOB
> )
>
> the following select stmt :
>
> SELECT
> WERT_ID,
> dbms_lob.getlength (INHALT) col_a,
> nvl (dbms_lob.getlength (INHALT),0.5) col_b,
> nvl (to_char(dbms_lob.getlength (INHALT)),'A') col_c
> FROM TYKON.TD_WERTE_ANLAGEN
>
> causes this result :
>
> WERT_ID COL_A COL_B COL_C
> ---------- ---------- ---------- ----------
> 1 .5 A
> 226 1067444 1067444 1067444
> 362 147456 147456 147456
> 452 276080 276080 276080
> 600 16903330 16903330 16903330
>
> I was surprised about the result, but from my point of view my posting is
> correct, or is it not ???
> Where's my mistake ?
>
> By the way, I sent my posting a little time before I saw yours, but
someone
> stood on the line..
> I don't wanted to blame you for your mail !
>
> Regards
> Dirk
>
> "Peter van Rijn" <p.vanrijnREMOVE_at_THISzhew.nl> schrieb im Newsbeitrag
> news:us2bo04c8l7gb4_at_corp.supernews.com...
> > It returns 0 (zero) if the BLOB is empty (=null).
> >
> > Peter
> >
> >
> > "Dirk Tschentscher" <dirk.tschentscher_at_volkswagen.de> schreef in bericht
> > news:apr8ql$ol53_at_doiweb4.volkswagen.de...
> > > Hi
> > > what about dbms_lob.getlength(blobfield).
> > > this function returns null when the field is null
> > >
> > > rgds
> > > Dirk
> > >
> > > "acelestial" <acelestial_at_twp.cwellington.on.ca> schrieb im Newsbeitrag
> > > news:MvYv9.124$896.10833975_at_radon.golden.net...
> > > > Hi,
> > > >
> > > > How do I check if a blob field is empty or null?
> > > > I want to update a column where the blob field is not null.
> > > > I tried IS NOT NULL but it keeps on updating all the records.
> > > > My syntax is:
> > > > UPDATE table
> > > > SET column1 = 'something'
> > > > WHERE blobfield IS NOT NULL;
> > > >
> > > > Any help is much appreciated.
> > > >
> > > > Thanks,
> > > > Arman
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Received on Thu Oct 31 2002 - 08:07:23 CST

Original text of this message

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