×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Jon Nickerson
Added: Dec 21, 2017 3:41 PM
Modified: Dec 21, 2017 3:48 PM
Views: 1
Tags: no tags
  1. CREATE OR REPLACE FUNCTION ZIADOISS.OISS_TFUNC(VLEVEL IN VARCHAR2, VTERM IN VARCHAR2, VWITHDRAWN IN VARCHAR2)
  2.   RETURN ZIADOISS.OISS_TAB
  3. PIPELINED
  4. IS
  5.   VTAB ZIADOISS.OISS_TAB;
  6.   --   VREC ZIADOISS.OISS_REC;
  7.   --   VREC ZIADOISS.OISS%ROWTYPE;
  8.   CURSOR C1 (VLEVEL VARCHAR2, VTERM VARCHAR2, VWITHDRAWN VARCHAR2) IS
  9.    --Example Cursor;
  10.   VREC C1%ROWTYPE;
  11.   BEGIN
  12.     FOR I IN C1(VLEVEL, VTERM, VWITHDRAWN)
  13.     LOOP
  14.       --       VREC.TERM_CODE := I.TERM_CODE;
  15.       --VREC.TERM_CODE := ;
  16.       PIPE ROW (OISS_REC(
  17.           I.ROWNUMBER,
  18.           I.LIBERTYID,
  19.           I.PIDM,
  20.           I.FNAME,
  21.           I.LNAME,
  22.           I.GENDER,
  23.           I.TERM_CODE,
  24.           I.LEVL_CODE,
  25.           I.APP_NUMBER,
  26.           I.NATION,
  27.           I.TB_COMPLIANT,
  28.           I.HOUSING,
  29.           I.COURSE_HOURS,
  30.           I.FCI_DATE,
  31.           I.ARRIVAL_DATE,
  32.           I.ISC_CHECK_IN,
  33.           I.TRAVEL_DOCS,
  34.           I.IAS,
  35.           I.ACCOUNT_BALANCE,
  36.           I.WITHDRAWN_IND,
  37.           I.ONLINE_HEALTH_FORM_IND
  38.       ));
  39.     END LOOP;
  40.     RETURN;
  41.   END;
  42. /