Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Insert new record and update exist
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