USE [Users_mdb]
GO
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Computer]'))
DROP VIEW [dbo].[Computer]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Computer]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Computer]
AS
SELECT        nID, tBriefDescription AS tName, Asset_Sub_status AS Status, Asset_Tag, OS_Name, Serial_Number
FROM            Resources01_Dat.dbo.tblDts
WHERE        (nUsageType = 1) AND (tShowInSummary = ''-1'') AND (Visible = 1 OR
                         Visible IS NULL) AND (Item_Level = 3) AND (Level_1 = 314)
' 
GO
