Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    148

    Unanswered: Package/SP execution

    Hi all. I have a package and procedure created and I'm getting an error when I try to call it. I'm not sure if I'm just calling it wrong, or it is something else.
    Thank you for your help!


    this is how i am calling it
    Code:
    Connected.
    BEGIN sp_GetUnBatched.sp_GetUnBatched ('I'); END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'SP_GETUNBATCHED'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Just in case, this is the proc and package body:

    Code:
    CREATE OR REPLACE PACKAGE sp_GetUnBatched
    AS
    	TYPE ref_cur         IS      	REF CURSOR;
    	PROCEDURE sp_GetUnBatched
    	(
    		BillSys                    IN      	VARCHAR2 DEFAULT NULL,
    		RC1                      IN  OUT 	REF_CUR
    	);
    END;
    /
    CREATE OR REPLACE PACKAGE BODY sp_GetUnBatched
    AS
    	PROCEDURE sp_GetUnBatched
    	(
    		BillSys                    IN      	VARCHAR2 DEFAULT NULL,
    		RC1                      IN  OUT 	REF_CUR
    	)
    	AS
    	BEGIN 
    		
    		OPEN RC1 FOR 
    		SELECT
    				 OWR.id,
    				 OWR.dCreated,
    				 OWR.cCreatorID,
    				 OWR.dOpened,
    				 OWR.dCompleted,
    				 OWR.cRegion,
    				 OWR.cBillSys
    		FROM  tbl_OWR_Batch OWR 
    		WHERE	 iSuperID  IS NULL
    		 AND	cBillSys  = sp_GetUnBatched.BillSys
    		ORDER BY cBillSys,
    			 cRegion,
    			 id DESC;
    	END;
    END;
    /

  2. #2
    Join Date
    Apr 2004
    Posts
    246
    You're procedure is declared as having two parameters, but you're only passing one.

  3. #3
    Join Date
    Dec 2003
    Posts
    148

    i guess the real q is.

    what is the value that is supposed to be passed in for a reference cursor? I naturally know what the other value is because it corresponds to a column in my table....would anyone happen to know the syntax for that?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •