Advertisement
bytecoded

TempDB Query Top 2 (SQL)

Mar 23rd, 2019
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.31 KB | None | 0 0
  1. (@P1 numeric(10))INSERT INTO #tt87 WITH(TABLOCK) (_REFFIELDRRef) SELECT
  2. T1._IDRRef
  3. FROM dbo._Reference42 T1
  4. INNER JOIN #tt87 T2 WITH(NOLOCK)
  5. ON T1._ParentIDRRef = T2._REFFIELDRRef
  6. LEFT OUTER JOIN #tt87 T3 WITH(NOLOCK)
  7. ON T1._IDRRef = T3._REFFIELDRRef
  8. WHERE ((T1._Fld595 = @P1)) AND (T3._REFFIELDRRef IS NULL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement