This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create a temporary table for all documents which are published and not in the recycle bin | |
CREATE TABLE #Nodes (id int) | |
-- Delete all rows if the table exists before | |
TRUNCATE TABLE #Nodes | |
-- Insert all nodeIds from all documents which are published and not in the recycle bin | |
INSERT INTO #Nodes | |
SELECT N.id | |
FROM umbracoNode N | |
INNER JOIN cmsDocument D ON N.ID = D.NodeId |