2023-09-14 15:29:46 -06:00
|
|
|
-- Generate Non-Duplicated PARENT FOLDER List
|
|
|
|
DROP TABLE DataInventory;
|
|
|
|
CREATE TABLE DataInventory AS
|
2023-09-15 09:09:14 -06:00
|
|
|
SELECT SERVER,
|
|
|
|
REPLACE(
|
|
|
|
Parent,
|
|
|
|
"X:\"," \ \ mpe.ca \ datadrive \ ") AS UNCPath,
|
|
|
|
REPLACE(REPLACE(Parent,(" X: \ " || Server)," / Shared / N - Data ")," \ "," / ") AS EgnytePath,
|
2023-09-14 15:29:46 -06:00
|
|
|
sum(FileCount), Sum(FileSize), 'Parent' as Source from FolderData
|
|
|
|
Where Parent not in (
|
|
|
|
SELECT Parent FROM DuplicateList
|
|
|
|
)
|
|
|
|
UNION
|
|
|
|
SELECT SERVER,
|
2023-09-15 09:09:14 -06:00
|
|
|
REPLACE(PATH," X: \ "," \ \ mpe.ca \ datadrive \ ") AS UNCPath,
|
|
|
|
REPLACE(REPLACE(PATH,(" X: \ " || Server)," / Shared / N - Data ")," \ "," / ") AS EgnytePath,
|
2023-09-14 15:29:46 -06:00
|
|
|
sum(FileCount), Sum(FileSize), 'Project' as Source from FolderData
|
|
|
|
Where Project not in (
|
|
|
|
SELECT A.Project FROM NonDupProject as A)
|
|
|
|
AND Parent not in (
|
|
|
|
Select B.Parent FROM NonDupParent as B
|
|
|
|
)
|
|
|
|
group by Server
|
2023-09-15 09:09:14 -06:00
|
|
|
ORDER BY Server;
|