Are you using PL / SQL? Or are you using Pro * C / C ++? SQLCA.SQLERRD will be defined in Pro * C / C ++, it will not be defined in PL / SQL. Since you did not mark the question for Pro * C, I assume that you are just using PL / SQL.
In PL / SQL, you simply reference SQL%ROWCOUNT after you run the SQL query to get the number of rows. Sort of
DECLARE l_num_rows INTEGER; BEGIN INSERT INTO t1( <<list of columns>> ) SELECT <<list of columns>> FROM <<some tables>> WHERE <<some predicates>> l_num_rows := sql%rowcount; dbms_output.put_line( 'The statement inserted ' || l_num_rows || ' rows.'; END;
source share