USE [Users_mdb]
GO
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[EmployeeAssets]'))
DROP VIEW [dbo].[EmployeeAssets]
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].[EmployeeAssets]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[EmployeeAssets]
AS
SELECT     nUserID AS nID, nID AS nCompositeID, nID AS nAssetID, Serial_Number, Asset_Tag, tBriefDescription AS tName, Level_1, Level_2
FROM         Resources01_Dat.dbo.tblDts
WHERE     (nUsageType = 1) AND (NOT (nUserID IS NULL)) AND (nUserID > 0) AND (Asset_Sub_status <> 12)
' 
GO
