Hello again,
I was wondering if someone could help me out with my learning. I am trying to totally disregard any understanding of SQL Server and start fresh with Oracle. I have created a stored procedure/package combo using oracle 9.2 as follows. Now could someone please explain the line PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE); Do I have 2 parameters in this procedure or one? Now how do I execute/run this. I am calling this procedure through crystal reports 9 and it is prompting me for a results_cursor. I have no idea what value should go in here. I thought the results of the select would populate the parameter. I am looking for a clear explaination. Thanks so much once again experts.
CREATE OR REPLACE PACKAGE GroupsPackage
AS
TYPE CURSOR_TYPE IS REF CURSOR;
PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE);
END;
/
CREATE OR REPLACE PACKAGE BODY GroupsPackage
AS
PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE)
IS
BEGIN
OPEN results_cursor FOR
SELECT Entry_id
FROM SHR_people
ORDER BY Entry_id;
END;
END;
/
I was wondering if someone could help me out with my learning. I am trying to totally disregard any understanding of SQL Server and start fresh with Oracle. I have created a stored procedure/package combo using oracle 9.2 as follows. Now could someone please explain the line PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE); Do I have 2 parameters in this procedure or one? Now how do I execute/run this. I am calling this procedure through crystal reports 9 and it is prompting me for a results_cursor. I have no idea what value should go in here. I thought the results of the select would populate the parameter. I am looking for a clear explaination. Thanks so much once again experts.
CREATE OR REPLACE PACKAGE GroupsPackage
AS
TYPE CURSOR_TYPE IS REF CURSOR;
PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE);
END;
/
CREATE OR REPLACE PACKAGE BODY GroupsPackage
AS
PROCEDURE Test_123 (results_cursor IN OUT CURSOR_TYPE)
IS
BEGIN
OPEN results_cursor FOR
SELECT Entry_id
FROM SHR_people
ORDER BY Entry_id;
END;
END;
/