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: pl/sql - update problem

Re: pl/sql - update problem

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 13 Nov 2002 19:41:02 +0100
Message-ID: <ut58igiq0cje8f@corp.supernews.com>

"Jim Poe" <jpoe_at_fulcrumit.com> wrote in message news:MPG.183c2d68a46e248e989689_at_news.telepacific.net...
>
> This is part of my pl/sql procedure:
>
> ********
> else
> update rb_item set item_size = vItemSize,
> folder_id = vFolderId,
> item_name = vItemName,
> template = empty_clob(),
> modified = ( sysdate - (to_date( '12/31/1899',
> 'MM/DD/YYYY' ))),
> revision = vRevision
> where item_id=vItemId and
> revision <> vRevision
> return template into l_blob;
> end if;
>
> dbms_lob.loadfromfile( l_blob, l_bfile, vItemSize );
>
> commit;
>
> dbms_lob.fileclose( l_bfile );
>
> *******
>
> The question is, if there are 0 rows updated the 'loadfromfile' and
> 'commit' should not be called. How do I know if 0 rows were updated?
>
> Thanks
> --
> Jim Poe
> Fulcrum InteTech, Inc.
> <jpoe_at_fulcrumit.com>

The result of an update is stored in SQL%ROWCOUNT. In the snippet above you need to catch this in a number variable.

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Wed Nov 13 2002 - 12:41:02 CST

Original text of this message

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