Re: need help with PL/SQL Procedure

From: Doron <doron_almog_at_msn.com>
Date: 15 Dec 2003 07:40:43 -0800
Message-ID: <995517bc.0312150740.45ed33f7_at_posting.google.com>


hi,
i think MERGE best fits your needs.

MERGE INTO new_table n
  USING old_table o
  ON (n.column = o.column)
  WHEN MATCHED THEN UPDATE SET ....
  WHEN NOT MATCHED THEN INSERT ..... sven_horn_at_web.de (Sven) wrote in message news:<4fbac945.0312100705.1b24037a_at_posting.google.com>...
> i try to write a PL/SQL procedure for Oracle 9.2
>
> is there a way to retrieve the number of affected rows of an INSERT or
> an UPDATE statement?
> i tried different ways with RETURNING INTO... but its not working :(
>
> my statement is like:
>
> insert into BEP_EQUIPMENT_CACHE
> (select * from BEP_EQUIPMENT_MV WHERE EQUIPMENT not in (SELECT
> EQUIPMENT FROM BEP_EQUIPMENT_CACHE));
>
> please help,
> thank you all - sven
Received on Mon Dec 15 2003 - 16:40:43 CET

Original text of this message