Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO #Ta751a31e0b7549d491a75b1e9b0db325
- VALUES(SELECT ALLOWED
- CurTable.ID
- FROM
- Reference88 CurTable
- INNER JOIN #Ta751a31e0b7549d491a75b1e9b0db325 TT1
- ON CurTable.ParentID = TT1.REFFIELD
- LEFT JOIN #Ta751a31e0b7549d491a75b1e9b0db325 TT2
- ON CurTable.ID = TT2.REFFIELD
- WHERE TT2.REFFIELD IS NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement