Counting Documents and Pages in Docuware

Need to know exactly how many documents and pages you have in a file cabinet?  There is not a direct way to do this but if you are the SQL administrator you can check with a simple queryif you are NOT a SQL admin you probably can not accomplish this but you can forward this to your SQL admin to assist them to getting the data you need.

SELECT ‘LABEL’ as ‘File Cab’, COUNT(*) AS ‘Docs’,  Coalesce(Sum(DWPAGECOUNT),0) as ‘Pages’  FROM {LOCATION OF YOUR FILE CABINET IN SQL}
Label is used to make the first column in the row the label for the data.
Count is exactly what you would expect keeps count of each line, 1 line 1 Document
Within the docuware data structure there is a PAGECOUNT item that tells how many pages are in the document.Coalesce(Sum(DWPAGECOUNT),0) keeps a running total of the DWPAGECOUNT and reports the results.
So for example if you had a file cabinet named CLASSES if would look something like this:
  SELECT ‘Classes’ as ‘File Cab’, COUNT(*) AS ‘Docs’,  Coalesce(Sum(DWPAGECOUNT),0) as ‘Pages’  FROM [dwdata].[dbo].[classes]
This is assuming the location of the File cabinet table is dwdata.IT will return a table like this:File Cab Docs PagesClasses 370         8664
Need more than 1 File cabinet UNION ALL works well  SELECT ‘Classes’ as ‘File Cab’, COUNT(*) AS ‘Docs’,  Coalesce(Sum(DWPAGECOUNT),0) as ‘Pages’  FROM [dwdata].[dbo].[classes]UNION ALL  SELECT ‘Testing’ as ‘File Cab’, COUNT(*) AS ‘Docs’,  Coalesce(Sum(DWPAGECOUNT),0) as ‘Pages’  FROM [dwdata].[dbo].[TESTING]
File Cab Docs PagesClasses 370         8664Testing 406         4075
Pretty handy of you are trying to find out what you have quickly.