.Looking for SQL Statement to obtain the Total Workspace Size of (Folder -- Subfolders -- Documents) in Megabytes (MBs) and or Gigabytes (GBs)
We are using SQL so Connect By Prior does not work to traverse hierchies.
What we have is similar to the DTreeAncestors table -- we have a SSIS package that runs a stored procedure daily that build a table of ParentIDs.
Not sure how to construct the SQL query to get the DataSize of Folder with Subfolders and Documents.
Example of tblParentIDs
ParentID FolderID Source
2480 2480 Root Folder Name
2480 2480 Root Folder Name Abbrev.
2480 72758 Root Folder Name Abbrev.
2480 2324 Root Folder Name Abbrev.
2480 24953 Root Folder Name Abbrev.
2480 483941 Root Folder Name Abbrev.
2480 36660 Root Folder Name Abbrev.
2480 2325 Root Folder Name Abbrev.
2480 2482 Root Folder Name Abbrev.
2480 4586427 Root Folder Name Abbrev.