Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (@P1 numeric(10))INSERT INTO #tt87 WITH(TABLOCK) (_REFFIELDRRef) SELECT
- T1._IDRRef
- FROM dbo._Reference42 T1
- INNER JOIN #tt87 T2 WITH(NOLOCK)
- ON T1._ParentIDRRef = T2._REFFIELDRRef
- LEFT OUTER JOIN #tt87 T3 WITH(NOLOCK)
- ON T1._IDRRef = T3._REFFIELDRRef
- WHERE ((T1._Fld595 = @P1)) AND (T3._REFFIELDRRef IS NULL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement