Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Procedure
Something like this might do it:
CREATE OR REPLACE FUNCTION load_table_rows(load_table IN varchar,
batch_id IN integer)
RETURN integer
AS
cur_id integer := DBMS_SQL.OPEN_CURSOR; rtn_code integer; num_rows integer;
||' where batch_id ='||to_char(batch_id), DBMS_SQL.V7);
DBMS_SQL.DEFINE_COLUMN(cur_id,1, num_rows);
rtn_code := DBMS_SQL.EXECUTE(cur_id);
IF DBMS_SQL.FETCH_ROWS(cur_id) = 0
THEN
/* Error */ num_rows = -1; ELSE DBMS_SQL.COLUMN_VALUE(cur_id,1, num_rows);END IF; return num_rows;
Regards
--Received on Tue Nov 18 1997 - 00:00:00 CST
*************************
Gary Smith CERN, Geneva, Switzerland Email: Gary.Smith_at_cern.ch Tel: +41 22 7678944
*************************