Advertisement
bytecoded

TempDB Query Top 4 (SQL)

Mar 23rd, 2019
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.42 KB | None | 0 0
  1. (@P1 numeric(10),@P2 numeric(10))INSERT INTO #tt84 WITH(TABLOCK) (_REFFIELDRRef) SELECT
  2. T1._IDRRef
  3. FROM dbo._Reference42 T1
  4. WHERE ((T1._Fld595 = @P1)) AND (T1._ParentIDRRef IN
  5. (SELECT
  6. T2._Q_001_F_000RRef AS Q_001_F_000RRef
  7. FROM #tt80 T2 WITH(NOLOCK)))
  8. UNION SELECT
  9. T3._IDRRef
  10. FROM dbo._Reference42 T3
  11. WHERE ((T3._Fld595 = @P2)) AND (T3._IDRRef IN
  12. (SELECT
  13. T4._Q_001_F_000RRef AS Q_001_F_000RRef
  14. FROM #tt80 T4 WITH(NOLOCK)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement