mess9

Untitled

Aug 4th, 2021
1,753
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     s.IDENTIFITIER AS IDENTIFITIER
  3. FROM
  4.     MDM6.CLIENT c
  5.         INNER JOIN
  6.     MDM6.SUBSCRIBER s
  7.         ON s.CLIENT_LOCALSYSTEMID = c.LOCALSYSTEMID
  8.         AND s.CLIENT_APP_PKID = c.APP_PKID
  9.         AND s.CLIENT_VERSION = c.VERSION
  10.         INNER JOIN
  11.     MDM6.SUBSCRIBERSERVICE ss
  12.         ON ss.SUBSCRIBER_LOCALSYSTEMID = s.LOCALSYSTEMID
  13.         AND ss.SUBSCRIBER_APP_PKID = s.APP_PKID
  14.         AND ss.SUBSCRIBER_VERSION = s.VERSION
  15.         INNER JOIN
  16.     MDM6.TECHSERVICE t
  17.         ON ss.TECHSERVICE_LOCALSYSTEMID = t.LOCALSYSTEMID
  18.         AND ss.TECHSERVICE_APP_PKID = t.APP_PKID
  19.         AND ss.TECHSERVICE_VERSION = t.VERSION 
  20. WHERE 1=1
  21.     AND c.DELETED = 0
  22.     AND ss.DELETED = 0
  23.     AND s.DELETED = 0
  24.     AND c.version = 0
  25.     AND ss.VERSION = 0
  26.     AND s.VERSION = 0
  27.     AND ss.STATUS = 1
  28.     AND c.ENDDATE > sysdate
  29.     AND s.ENDDATE > sysdate
  30.     AND ss.ENDDATE > sysdate
  31.     AND s.SUBSCRIBERSTATUS_LOCALSYSTEMID = '1'
  32.     AND ss.TECHSERVICE_LOCALSYSTEMID = '369300148' -- ядиск100 для волги
  33.     AND c.APP_PKID = 44 -- отсеять по волге киров
  34. OFFSET ? ROWS
  35. FETCH FIRST 1 ROWS ONLY
RAW Paste Data