SHARE
TWEET

Untitled

bisonn Oct 28th, 2019 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSERT INTO #tt5 WITH(TABLOCK) (_Q_001_F_000RRef, _Q_001_F_001RRef, _Q_001_F_002RRef, _Q_001_F_003) SELECT
  2. T1._Q_000_F_000RRef,
  3. ISNULL(T2._IDRRef,@P1),
  4. ISNULL(T3._IDRRef,@P2),
  5. T1._Q_000_F_004
  6. FROM #tt4 T1 WITH(NOLOCK)
  7. LEFT OUTER JOIN dbo._Reference118 T2
  8. ON (CASE WHEN ((T1._Q_000_F_002 = 0x00) OR (T1._Q_000_F_003RRef = @P3)) THEN 0x00 ELSE CASE WHEN (T1._Q_000_F_003RRef = @P4) THEN CASE WHEN (CASE WHEN T1._Q_000_F_001RRef IS NOT NULL THEN 0x08 END = T2._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_001RRef IS NOT NULL THEN 0x00000025 END = T2._OwnerID_RTRef AND T1._Q_000_F_001RRef = T2._OwnerID_RRRef) THEN 0x01 WHEN NOT (CASE WHEN T1._Q_000_F_001RRef IS NOT NULL THEN 0x08 END = T2._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_001RRef IS NOT NULL THEN 0x00000025 END = T2._OwnerID_RTRef AND T1._Q_000_F_001RRef = T2._OwnerID_RRRef) THEN 0x00 END ELSE CASE WHEN (CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x08 END = T2._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x00000047 END = T2._OwnerID_RTRef AND T1._Q_000_F_000RRef = T2._OwnerID_RRRef) THEN 0x01 WHEN NOT (CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x08 END = T2._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x00000047 END = T2._OwnerID_RTRef AND T1._Q_000_F_000RRef = T2._OwnerID_RRRef) THEN 0x00 END END END) = 0x01 AND (T2._Fld346 = @P5)
  9. LEFT OUTER JOIN dbo._Reference112 T3
  10. ON (CASE WHEN (T1._Q_000_F_005RRef = @P6) THEN CASE WHEN (CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x08 END = T3._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x00000047 END = T3._OwnerID_RTRef AND T1._Q_000_F_000RRef = T3._OwnerID_RRRef) THEN 0x01 WHEN NOT (CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x08 END = T3._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_000RRef IS NOT NULL THEN 0x00000047 END = T3._OwnerID_RTRef AND T1._Q_000_F_000RRef = T3._OwnerID_RRRef) THEN 0x00 END ELSE CASE WHEN (CASE WHEN T1._Q_000_F_005RRef IS NOT NULL THEN 0x08 END = T3._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_005RRef IS NOT NULL THEN 0x00000042 END = T3._OwnerID_RTRef AND T1._Q_000_F_005RRef = T3._OwnerID_RRRef) THEN 0x01 WHEN NOT (CASE WHEN T1._Q_000_F_005RRef IS NOT NULL THEN 0x08 END = T3._OwnerID_TYPE AND CASE WHEN T1._Q_000_F_005RRef IS NOT NULL THEN 0x00000042 END = T3._OwnerID_RTRef AND T1._Q_000_F_005RRef = T3._OwnerID_RRRef) THEN 0x00 END END) = 0x01 AND (T3._Fld346 = @P7)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top