I am trying to insert records into a table using insert….select…stmt in a oracle stored procedure. How do find the number of records inserted using SQLERRD?
recIn number;
Insert into t1 ....Select.....;
recIn := SQLCA.SQLERRD(3);
....
....
PLS-00201: identifier 'SQLCA.SQLERRD' must be declared
is the error message thrown. How do you declare SQLCA.SQLERRD?
using Oracle 9.2
bcs
Are you using PL/SQL? Or are you using Pro*C/C++?
SQLCA.SQLERRDwould be defined in Pro*C/C++, it would not be defined in PL/SQL. Since you didn’t tag the question for Pro*C, I’m guessing that you’re just using PL/SQL.In PL/SQL, you simply reference
SQL%ROWCOUNTafter running a SQL statement to get the row count. Something like