USE [Resources02_Def]
GO

IF NOT EXISTS(SELECT nID FROM [dbo].[tblSystemCustomQueries] WHERE nID=62)
	INSERT [dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) 
	VALUES (62, N'Lemons', N'Lemons', 6, 2, NULL, 15)

GO

IF NOT EXISTS(SELECT nID FROM [dbo].[tblSystemCustomQueries] WHERE nID=63)
	INSERT [dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) 
	VALUES (63, N'Containers', N'Containers', 6, 2, 1, 16)

GO

IF NOT EXISTS(SELECT nID FROM [dbo].[tblSystemCustomQueries] WHERE nID=64)
	INSERT [dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) 
	VALUES (64, N'Assets$In$My$Containers', N'Assets In My Containers', 6, 2, 1, 16)

GO

IF NOT EXISTS(SELECT nID FROM [dbo].[tblSystemCustomQueries] WHERE nID=65)
	INSERT [dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) 
	VALUES (65, N'My$Containers', N'My Containers', 6, 2, 1, 16)

GO

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

GO

UPDATE [dbo].[tblSystemCustomQueries] SET tCaption='Base Assets - Managed Asset Instances' WHERE nID=24

GO
