Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Script by uzd19483

VIEWS: 17 PAGES: 1

									/*************************************************
*                                                *
* Script name : isActiveStudentTF.sql            *
* Purpose     : Determines if there is an active *
*               student (STU) affiliation for a *
*               given Penn_ID. The information is*
*               retrieved from the Affiliation   *
*               table in Penn Community based on *
*               the active_code field. This will *
*               be used for access control in    *
*               the Online Directory Application.*
*               This calls the function isActive *
*               Student which takes in a penn_id *
*               or a Pennkey as an input parm    *
*               and returns a Boolean value.This *
*               function is a wrapper function to*
*               return either a T or F instead   *
*               of the Boolean value             *
*                                                *
* Maintenance History:                           *
* --------------------                           *
* 08/05/2003   MC    Initial Creation            *
*                                                *
*************************************************/
CREATE OR REPLACE FUNCTION isActiveStudentTF
(in_penn_id VARCHAR2)
RETURN VARCHAR2 IS

  lRetBool BOOLEAN DEFAULT FALSE;
  lRetChar VARCHAR2(1) DEFAULT 'F' ;

BEGIN

  BEGIN

    lRetBool := isActiveStudent(in_penn_id) ;

    IF lRetBool THEN
       lRetChar:= 'T';
    ELSE
       lRetChar := 'F';
    END IF;

 EXCEPTION
 WHEN OTHERS THEN
    lRetChar := 'F';
 END;

 RETURN lRetChar;

END isActiveStudentTF;
/

								
To top