Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

merge statement - sql%rowcount

Gor_MahiaJul 4 2023
 Hi,  
  something not right here:  i wonder what iam missing  
  i have merge statement for INSERT which insert records into target table and it works but immediately after that the sql%rowcount doesnt go into the body of the below IF Statement,  
    
  MERGE INTO vendor\_t a  
                USING(……  
  ........  
  ........;

IF SQL%ROWCOUNT>= 1 THEN
P_STATUS := 'TRUE';

INSERT INTO proj_LOG_T (v_CODE, v_DESCRIPTION)
VALUES ( 7777, L_STATUS||': TABLE SUCCESSFULLY PROCESSED!');
COMMIT;
ELSE
P_STATUS := 'NOT PROCESSED';
END IF;
......

so why is not process the SQL%ROWCOUNT>= 1 block?

Oracle 11g,

thank you.

This post has been answered by Barbara Boehmer on Jul 4 2023
Jump to Answer
Comments
Post Details
Added on Jul 4 2023
1 comment
924 views