cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Query display Number of pages per document

Todd_Priest
Star Contributor
Star Contributor

I have a customer that is looking for a way to run a Custom Query and display the number of pages for each of the documents. Is there any way to do this. Custom SQL query?

Thanks

11 REPLIES 11

Seth_Yantiss
Star Collaborator
Star Collaborator

Jose,

You should consider joining the Insurance Vogue.  It's a really active group that could benefit from your membership.

Drew_Hargrave
Confirmed Champ
Confirmed Champ

This is very useful query, populate an AutoFill with Itemnum and NumberPages, then build a workflow that populates a Page Count keyword with the AutoFill. This really should come out of the box, it's easy and there are tons of posts out where people are trying to figure out a way to show Page Count in search results. 

 

SELECT
Itemnum,
CASE
WHEN SUM(numberpages) > '1'

THEN SUM(numberpages)

ELSE numberpages

END
AS numberpages

FROM [Nautilus].[hsi].[itemdatapage]

WHERE Itemnum = @primary

GROUP BY Itemnum, numberpages;