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: Replacing NVL

Re: Replacing NVL

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 12 Jun 2002 12:52:44 +0100
Message-ID: <3d07360c$0$238$ed9e5944@reading.news.pipex.net>


begin transaction
update tablex set columnx = columnx + 1 where pkx=? and columnx is not null update tablex set columnx = 1 where pkx =? and columnx is null end transaction

"Mikko Lehtinen" <mikko.lehtinen_at_add2phone.com> wrote in message news:ae7ad1$ndl$1_at_phys-news1.kolumbus.fi...
> Hi all,
>
> Does anyone know how the following SQL statement can be implemented
without
> oracle specific nvl function?
>
> Column pkX is a varchar2 and columnX is a number.
>
> UPDATE tableX SET columnX = nvl(columnX, 0) + 1 WHERE pkX=?
>
>
>
> Thanks
>
>
>
> Mikko
>
>
>
Received on Wed Jun 12 2002 - 06:52:44 CDT

Original text of this message

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