SQL
USE [PrintMonitor]
GO
/****** Object:  View [dbo].[CATEGORISED PRINTED DOCUMENTS]    Script Date: 10/15/2008 21:48:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[CATEGORISED PRINTED DOCUMENTS]
AS
SELECT     dbo.[Categorised Documents].[Category Type], dbo.[Categorised Documents].[Category Name], dbo.Printers.Name, dbo.[Print Jobs].Submitted, 
                      dbo.[Print Jobs].[User name], dbo.[Print Jobs].[Document Name], dbo.[Print Jobs].Pages, dbo.[Print Jobs].[Paper Type], 
                      dbo.[Print Jobs].[Pages Printed]
FROM         dbo.[Categorised Documents] INNER JOIN
                      dbo.[Print Jobs] ON dbo.[Categorised Documents].[Printer Id] = dbo.[Print Jobs].[Printer Id] AND 
                      dbo.[Categorised Documents].[Job Id] = dbo.[Print Jobs].[Job Id] AND 
                      dbo.[Categorised Documents].[Printer Reboot Count] = dbo.[Print Jobs].[Printer Reboot Count] INNER JOIN
                      dbo.Printers ON dbo.[Print Jobs].[Printer Id] = dbo.Printers.Id

Last edited Oct 15, 2008 at 8:49 PM by Merrion, version 1

Comments

No comments yet.