USE [censusweb_mdb]
GO


IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=6 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 6, N'<None>')
GO

IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=8 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 8, N'Configuration')
GO

IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=7 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 7, N'<ViewName>')

IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=23 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 23, N'configuration item')

IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=24 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 24, N'configuration items')
	
IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=27 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 27, N'Configure settings, imports and other parameters of VIZOR')

IF NOT EXISTS( SELECT * FROM [dbo].[tblWebViewAttribute] WHERE [nViewID]=87 AND [nViewAttributeID]=37 )
	INSERT [dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (87, 37, N'configuration.png')
	
GO


UPDATE tblWebViewAttribute SET tValue='Software Licenses' WHERE nViewID=54 AND nViewAttributeID=7 And tValue='Software'
GO

UPDATE tblWebViewAttribute SET tValue='Software Licenses' WHERE nViewID=54 AND nViewAttributeID=8 And tValue='Software'
GO

UPDATE tblWebViewAttribute SET tValue='Contract Agreements & Purchases' WHERE nViewID=46 AND nViewAttributeID=7 And tValue='Agreements & Purchases'
GO

UPDATE tblWebViewAttribute SET tValue='Contract Agreements & Purchases' WHERE nViewID=46 AND nViewAttributeID=8 And tValue='Agreements & Purchases'
GO

