Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IF OBJECT_ID(N'tempdb..#temp_ids', N'U') IS NOT NULL
- BEGIN
- DROP TABLE #temp_ids
- END
- CREATE TABLE #temp_ids
- (
- FileGuid uniqueidentifier,
- );
- INSERT INTO #temp_ids(FileGuid) VALUES(@GUIDS)
- DELETE FROM dbo.DocumentStore
- WHERE stream_id IN
- ( SELECT ds.stream_id
- FROM dbo.DocumentStore ds
- INNER JOIN
- #temp_ids ti ON
- ds.stream_id != ti.FileGuid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement