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: Insert new record and update exist

Re: Insert new record and update exist

From: Tanel Poder <change_to_my_first_name_at_integrid.info>
Date: Fri, 15 Aug 2003 18:34:30 +0300
Message-ID: <3f3cfd8b_1@news.estpak.ee>


If you're in 9i, use MERGE command instead.

If lower version, you could first try to update the record and if SQL%NOTFOUND (or whatever was it called is returned, do an insert instead). That way you don't have to do the additional select command.

Tanel.

"Mohammad" <mhakimjavadi_at_hotmail.com> wrote in message news:cc59b627.0308150635.56992bc2_at_posting.google.com...
> Hi,
>
> I have problem to make query to check the Oracle table for update,if
> record is new inster that and if it is exist record just update that.
>
> The insert record works fine. How do I can check if it is exits just
> update that.
>
>
> Thank you for you help
>
> Mohammad
Received on Fri Aug 15 2003 - 10:34:30 CDT

Original text of this message

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