Executing stored proc in Toad SQL Editor
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Executing stored proc in Toad SQL Editor

  1. #1
    Join Date
    Jul 2005
    Posts
    8

    Executing stored proc in Toad SQL Editor

    I have a stored procedure that returns a result set using a REF_CURSOR output parameter. How do I execute the stored procedure using TOAD SQL Editor instead of SQL Plus? I tried clicking on the Package and clicking the yellow thunderbolt and inserting the input parameters, but it is having viewing the result set - ref_cursor. Any ideas?

    Thanks in advance!

  2. #2
    Join Date
    Jan 2004
    Posts
    162
    (based on TOAD 8.5.3.2)

    When you are inserting parameters (the 'Set Parameters' dialogue) click the 'Options' button to access the 'Output Options' which lets you configure how ref cursors will be displayed. I pretty much just use the 'Load into grid from memory (strong and weak)' option.

  3. #3
    Join Date
    Jul 2005
    Posts
    8
    I'm running TOAD 8.0.0.47 and I don't see the 'Load into grid from memory (strong and weak)' option. When I click the print DBMS output or the Create and Write to table option I get an error.
    The procedure executes fine in SQL PLUS but I can't get it to execute using TOAD. I get the following error in the second declare statement below: Error: PLS-00320: the declaration of the type of this expression is incomplete or malformed
    DECLARE
    SAL_WKS UPK_GET_SALARY_AVAIL_WEEKS.ref_cursor;
    SAL_WKS_row SAL_WKS%ROWTYPE;

    Everything is spelled correctly and so I'm not sure why I would be getting that error.. The UPK_GET_SALARY_AVAIL_WEEKS create statement is:

    CREATE OR REPLACE PACKAGE UPK_GET_SALARY_AVAIL_WEEKS IS
    TYPE ref_cursor IS REF CURSOR;
    PROCEDURE USP_C_TMWKSL_GET_SAL_WEEKS_SEL ( I_EMP_NUM VARCHAR2,
    I_EMP_ROLE VARCHAR2, SAL_WKS OUT ref_cursor );

    I'm quite confused...

  4. #4
    Join Date
    Jan 2004
    Posts
    162
    I suppose downloading an upgrade is out of the question?

  5. #5
    Join Date
    Jul 2005
    Posts
    8
    Good question... probably is out of the question at the moment..

Posting Permissions

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


Click Here to Expand Forum to Full Width