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: TurkBear <john.greco_at_dot.state.mn.us>
Date: Fri, 15 Aug 2003 10:03:23 -0500
Message-ID: <cctpjvo7cnofoh3rv09kt6sd252gphg5nb@4ax.com>


mhakimjavadi_at_hotmail.com (Mohammad) wrote:

>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

You will need to create a Pl/Sql proc to open a cursor to the source data, and,for each row returned by the cursor,check the target table key fields against the cursor's contents and take appropriate action. ( read the docs on IF and LOOP usage) Received on Fri Aug 15 2003 - 10:03:23 CDT

Original text of this message

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