USE [Resources02_Def]
GO


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

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

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=70 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (70, N'Project', N'Like', N'<null>', N'And', NULL, NULL, NULL, 3, 3, 1021, NULL)
GO

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

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=71 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (71, N'Department (Allocation Tab)', N'Like', N'<not null>', N'Or', NULL, NULL, 3, 5, 1, 1019, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=71 AND nRow=2)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (71, N'    Location', N'Like', N'<not null>', N'Or', 1, 1, NULL, 3, 2, 882, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=71 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (71, N'    Project', N'Like', N'<not null>', N'And', 1, 1, NULL, 2, 3, 1021, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=71 AND nRow=4)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (71, N'Usage Type', N'=', N'Asset Instance', NULL, NULL, NULL, NULL, 1, 4, 806, NULL)
GO
	
IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=72 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (72, 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=72 AND nRow=2)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (72, N'License Server', N'Like', N'<not null>', N'And', NULL, NULL, NULL, 1, 2, 1212, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=72 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (72, 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=2)
	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=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (68, N'Usage Type', N'=', N'Asset Instance', N'And', NULL, NULL, NULL, 3, 3, 806, NULL)
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=68 AND nRow=4)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (68, N'License Server', N'Like', N'<null>', NULL, NULL, NULL, NULL, 4, 4, 1212, NULL)
GO

