Help > Views > V_SheetPageImagePerProcess

View: V_SheetPageImagePerProcess

This view shows the number of sheets, pages and images of each root document in a process.

Column

Description

ClientName

The name of the client (Name in C_Client).

ProcessName

The name of the process  (Name in C_Process).

BatchID

The ID of the root document (BatchID in W_Document).

SheetNo

The number of sheets in this root document.

PageNo

The number of pages in this root document.

ImageNo

The number of images in this root document.

SQL Script

CREATE VIEW [dbo].[V_SheetPageImagePerProcess]
AS
SELECT  dbo.C_Client.Name AS ClientName,dbo.C_Process.Name AS ProcessName,dbo.W_Document.BatchID,
            (SELECT COUNT(*) FROM dbo.W_Sheet WHERE (BatchID = dbo.W_Document.BatchID)) AS SheetNo,
            (SELECT COUNT(*) FROM dbo.W_Page WHERE (BatchID = dbo.W_Document.BatchID)) AS PageNo,
            (SELECT COUNT(*) FROM dbo.W_Image WHERE (BatchID = dbo.W_Document.BatchID)) AS ImageNo
FROM     dbo.C_Process INNER JOIN
            dbo.C_Client ON dbo.C_Client.ID = dbo.C_Process.ClientID INNER JOIN
            dbo.W_Document ON dbo.C_Process.ID = dbo.W_Document.ProcessID

Uses

The available tables

The available views