1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Prcedure help :new bie

Discussion in 'SQL PL/SQL' started by senthil_nagore, Oct 19, 2009.

  1. Hi wats wrong in my procedure

    CREATE OR REPLACE PACKAGE "TYPESCUR"
    AS
    TYPE cursorType IS REF CURSOR;
    END;
    /

    CREATE OR REPLACE PROCEDURE tt_is_logged_out
    (P_deptno In varchar ,p_cursor_a OUT Typescur.cursorType)
    AS

    DECLARE temp_signout date;
    Declare temp_result number(10):=0;


    BEGIN



    select sign_out into temp_signout from tt_login_details where emp_id = P_deptno and auto_id = 1 ;

    if (temp_signout is null) then
    set temp_result := 0;
    else
    set temp_result := 1;
    end if;


    OPEN p_cursor_a FOR select temp_result Result from dual;


    END;


    Can any one Help me?
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    With what, exactly? What is the problem with this code besides the package which is really of little use since SYS_REFCURSOR is a predefined type? What are you trying to fix? Tell us that information and possibly someone can point you in the right direction.