USE [Resources02_Def]
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=62 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (62, N'Is Lemon', N'=', N'Yes', NULL, NULL, NULL, NULL, NULL, 1, 69, NULL);
GO

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=63 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (63, N'Track As', N'=', N'Container', N'And', NULL, NULL, NULL, 2, 1, 993, NULL);
GO

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

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=64 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (64, N'Responsible of Container', N'=', N'<User>', N'And', NULL, NULL, NULL, 2, 1, 76, NULL);
GO

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

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=65 AND nRow=1)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (65, N'Allocated to Person', N'=', N'<User>', N'And', NULL, NULL, NULL, 2, 1, 11, NULL);
GO

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

IF NOT EXISTS(SELECT * FROM [dbo].[tblSystemQueries] WHERE nID=65 AND nRow=3)
	INSERT [dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) 
	VALUES (65, N'Track As', N'=', N'Container', N'And', NULL, NULL, 1, 2, 3, 993, NULL);
GO

DELETE [dbo].[tblSystemQueries] WHERE nID=39


