Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2012
    Posts
    5

    Unanswered: Problem returning result set from sp ORA-06550: line 1, column 7:

    Hi, haven't used Oracle cursor before so expect this is a syntax issue. Basically want the sp to return a dataset I can use for a report. I get the following error..

    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'MH_READMISSIONS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    CODE


    DROP PROCEDURE REPORTING.MH_READMISSIONS;
    CREATE OR REPLACE PROCEDURE REPORTING.MH_Readmissions (r_cursor out sys_refcursor )IS

    BEGIN

    open r_cursor for select * from nondrg_prod.readmissions_data_mh;

    END MH_Readmissions;
    /

    TIA

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Since we don't know exactly what you did to generate the error,
    we can guess what need to be changed to prevent the error from being throw.
    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.

  3. #3
    Join Date
    Jul 2012
    Posts
    5
    I executed the sp and got the error shown in post.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Quote Originally Posted by bobghw View Post
    I executed the sp and got the error shown in post.

    Agreed. You invoked it with wrong number or types of arguments in call to 'MH_READMISSIONS'

    If you invoke SP correctly, then no error get thrown

    Can you use COPY & PASTE so we can really see EXACTLY what you do?
    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.

  5. #5
    Join Date
    Jul 2012
    Posts
    5
    Screenshot attached
    Attached Thumbnails Attached Thumbnails ScreenShot005.jpg  

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >CREATE OR REPLACE PROCEDURE REPORTING.MH_Readmissions (r_cursor out sys_refcursor )
    as you can see the procedure is defined to have ONE argument.
    when you invoke it with with ZERO (0 != 1) argument, then wrong number of argument error gets thrown.
    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.

  7. #7
    Join Date
    Jul 2012
    Posts
    5
    Ok, so how do I manage the output? all I want is the result that I can then use in a report.

  8. #8
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Realize that all I know about your environment is what you post here & so far that is ZERO!
    This problem is not directly about Oracle.
    This problem is that some unnamed Report Writer does not know how to interface to Oracle DB.
    Consider posting this problem in some forum that is for what ever software you are pointing & clicking.
    Consider that GOOGLE is your friend, but only when you actually use it.
    You're On Your Own (YOYO)!
    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.

  9. #9
    Join Date
    Jul 2012
    Posts
    5
    I am overwhelmed by your cordiality and helpful responses.

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Your approach is like the following.

    my car won't go.
    tell me how to make my car go.

    You get sanctimoniousness when reminded the lack of useful response is reciprocal to details provided.
    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.

  11. #11
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by bobghw View Post
    I am overwhelmed by your cordiality and helpful responses.:p
    OK, here are threads demonstrating execution of procedures having OUT parameter of REF CURSOR data type (and displaying its content) in sqlplus:
    http://www.dbforums.com/oracle/10946...ut-cursor.html
    http://www.dbforums.com/oracle/92774...ef-cursor.html
    As you posted nothing about environment where you execute the procedure (although you was asked to do so multiple times), it is on you to find the appropriate way to obtain "the result that I can then use in a report".
    Good luck with your attitude.

Posting Permissions

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