Advertisement
VoronVU

Untitled

Dec 16th, 2014
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Тип данных для курсора
  2. TYPE LIST_CLIENT_SUB IS RECORD (
  3. --Поля типа данных
  4.   CLIENT_ID CLIENT.CLIENT_ID%TYPE,
  5.   NEW_STATUS INTEGER,
  6.   OLD_STATUS INTEGER,
  7.   START_STATUS_DATE DATE,
  8.   FINISH_STATUS_DATE DATE);
  9.  
  10. --Курсор с параметрами
  11. CURSOR curLIST_CLIENT_SUB(d1 DATE, d2 DATE) RETURN LIST_CLIENT_SUB IS
  12.    SELECT
  13.      cl.CLIENT_ID,
  14.      NEW_STATUS,
  15.      OLD_STATUS,
  16.      START_STATUS_DATE,
  17.      FINISH_STATUS_DATE
  18.    FROM CLIENT cl
  19.    WHERE cl.REC_DATE BETWEEN d1 AND d2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement