USE [Resources02_Def]
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=9)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Asset Class', N'<>', N'Software', N'And', NULL, 0, NULL, 7, 9, 1092, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Managed', N'=', N'Yes', N'Or', 0, 0, 1, 3, 1, 907, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=10)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Asset Class', N'<>', N'Services', NULL, NULL, NULL, NULL, 9, 10, 1092, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=2)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'    Managed', N'Like', N'<Null>', N'And', 1, 1, 0, 0, 2, 907, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Visible', N'=', N'Yes', N'Or', 0, 0, 1, 1, 3, 1023, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=4)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'    Visible', N'Like', N'<Null>', N'And', 1, 3, 0, 0, 4, 1023, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=5)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Usage Type', N'=', N'Asset Instance', N'And', 0, 0, 0, 3, 5, 806, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=66 AND nRow=7)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (66, N'Status', N'=', N'In Stock / Storage', N'And', NULL, 0, NULL, 5, 7, 865, NULL)
GO




IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=67 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (67, N'Asset Class', N'=', N'Software', N'And', NULL, NULL, 0, 2, 1, 1092, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=67 AND nRow=2)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (67, N'Allocated to Device / Computer', N'Like', N'<not null>', N'And', NULL, NULL, NULL, 1, 2, 1099, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=67 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (67, N'Usage Type', N'=', N'Asset Instance', NULL, NULL, NULL, NULL, 2, 3, 806, NULL)
GO


IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=68 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (68, N'Status', N'=', N'In Stock / Storage', N'And', NULL, NULL, 0, 2, 1, 865, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=68 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (68, N'Allocated to Device / Computer', N'Like', N'<null>', N'And', NULL, NULL, NULL, 1, 2, 1099, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=68 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (68, N'Usage Type', N'=', N'Asset Instance', NULL, NULL, NULL, NULL, 3, 3, 806, NULL)
GO

