cancel
Showing results for 
Search instead for 
Did you mean: 

Counting documents and pages for queue with a sweep directory?

Peter_Scaramuzz
Star Contributor
Star Contributor

A user asked for a report for a sweep queue of how many documents and pages are *originally* coming into OnBase. There are 3 queues that average about 8000 documents but when I use the numberofdocuments field in the archivedqueue table, 2 of the 3 show zero documents. I modeled it after the "Scheduled Scan Queue Sweep Process" SQL code where I am summing up the detail:

FROM hsi.scheduledprocess sched JOIN hsi.archivedqueue b ON sched.prockey = b.queuenum
        JOIN hsi.registeredusers r ON sched.registernum = r.registernum
        WHERE b.datestarted @DateRange
        AND (r.registernum = @RegisterNum)
        AND (sched.schedprocnum = @SchedProcNum)
        ORDER BY b.batchnum

I also noticed that the totalpages sums are way too high and for two of the three where the numberofdocuments sum out to zero. Is this the wrong approach?

0 REPLIES 0