cancel
Showing results for 
Search instead for 
Did you mean: 

Document type counts

Mike_Kroner1
Star Contributor
Star Contributor

Hello,

Would anyone have SQL to show the doc types and counts over the past 6 months?

Document Type|Count|Last Doc Date

Insurance|5|02/02/2024

I9|22|05/05/2024

Thanks

4 REPLIES 4

AdamShaneHyland
Employee
Employee

Hi @Michael ,

 

Here is a post with a similar request ...

 

https://community.hyland.com/forum/threads/36217-document-counts-by-document-type-and-document-type-...

 

Best wishes.

AdamShaneHyland
Employee
Employee

Hi @Michael

Here is a query I had lying around ...

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTEDSELECT	CASE WHEN itg.itemtypegroupname IS NULL THEN 		CASE WHEN dt.itemtypename IS NULL THEN '-- Grand Total' END	ELSE itg.itemtypegroupname -- Document Type Group Total	END as 'Document Type Group Name',	CASE WHEN dt.itemtypename IS NULL THEN 		CASE WHEN itg.itemtypegroupname IS NULL THEN '-- Document Type Grand Total' 		ELSE '-- Document Type Group Total'		END	ELSE dt.itemtypename -- Document Type Total	END as 'Document Type Name',	COUNT(id.itemnum) as 'Document Type Count'	FROM hsi.itemdata idJOIN hsi.doctype dt ON dt.itemtypenum = id.itemtypenumJOIN hsi.itemtypegroup itg ON itg.itemtypegroupnum = id.itemtypegroupnumGROUP BY itg.itemtypegroupname, dt.itemtypename with ROLLUPORDER BY itg.itemtypegroupname ASC

 

Best wishes.

sskupien
Community Manager
Community Manager

@Adam Shane  Was that on your refrigerator? 🙂

AdamShaneHyland
Employee
Employee

Ha, @Scoop Skupien .  Nope, but it was in the "random stuff that you never know when you are going to need" drawer.  😉