FileServerDedupe/Generate Egnyte Export.sql
2023-10-03 13:11:01 -06:00

15 lines
490 B
SQL

DROP TABLE IF EXISTS DataInventory;
create table DataInventory as
Select * from (
SELECT SERVER,
REPLACE(
Parent,
"X:\","\\mpe.ca\datadrive\") AS UNCPath,
REPLACE(REPLACE(REPLACE(Parent,("\\mpe.ca\datadrive\" || Server),REPLACE("/Shared/N-Data/" || Server || "_/","_/","_")),"\","/"),"_/","_") AS EgnytePath,
sum(FileCount) as FileCount, Sum(FileSize) as FileSize, Status from FolderData
WHERE FolderData.fld_MigrationID IS NULL
GROUP by UNCPath
ORDER by UNCPath
);