Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    14

    Unanswered: help executing oracle stored procedure

    Hi i can't for the life of me figure out how to execute this stored procedure in either toad or sqlplus. heres my stored procedure:

    PROCEDURE getlots (p_wafersize varchar2, p_area varchar2, p_subarea varchar2, io_cursor IN OUT t_cursor)
    IS
    v_cursor t_cursor;
    BEGIN
    IF p_subarea = 'ALL' OR p_subarea='N/A'
    THEN
    OPEN v_cursor FOR
    SELECT
    subarea,
    operName,
    fab,
    lot,
    route,
    qty,
    dao,
    cat,
    movesRem

    FROM
    FJW7WIP

    WHERE
    wafersize = p_wafersize AND
    area = p_area

    ORDER BY
    dao desc;
    ELSE
    OPEN v_cursor FOR
    SELECT
    subarea,
    operName,
    fab,
    lot,
    route,
    qty,
    dao,
    cat,
    movesRem

    FROM
    FJW7WIP

    WHERE
    wafersize = p_wafersize AND
    area = p_area AND
    subarea = p_subarea

    ORDER BY
    dao desc;
    END IF;
    io_cursor := v_cursor;
    END getlots;

    can anyone help ? thanks in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    DECLARE
    BEGIN
    getlots(....);
    END;
    /
    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
    Sep 2003
    Location
    Virginia, USA
    Posts
    246

    Re: help executing oracle stored procedure

    SQLPLUS> exec proc_name [param1, param2, etc.]

    for example, if I have a stored procedure named HIMOM that had no mandatory parameters, then I would launch sqlplus and issue the command EXEC HIMOM;

    to call it from within another pl/sql block, you need to omit the EXEC command as that is a SQL*Plus command and not a PL/SQL command. See other reply for syntax.

Posting Permissions

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