Use [Purchases&Agreements01_Dat]
GO

ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Asset_Type] [int] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Purchased_For_Department] [int] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Purchased_For_Location] [int] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [GL_Account] [int] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Alert_30_Days] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Alert_60_Days] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Alert_90_Days] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Alert_7_Days] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Alert_0_Days] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Review_Date] [datetime] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Auto_Create_Assets] [bit] NOT NULL DEFAULT ('0')
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Reference_ID] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Process_Pending] [int] NULL
ALTER TABLE [Purchases&Agreements01_Dat].[dbo].tblDts ADD [Stakeholders] [nvarchar](max) NULL
GO


Use [Purchases&Agreements02_Def]
GO

CREATE TABLE [Purchases&Agreements02_Def].[dbo].[GLAccount](
	[nID] [int] NOT NULL,
	[nChoiceID] [int] NULL,
	[tName] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_GLAccount] PRIMARY KEY CLUSTERED 
(
	[nID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (1, 1, N'0502');
INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (2, 2, N'0502N');
INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (3, 3, N'8001');
INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (4, 4, N'9041');
INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (5, 5, N'9043');
INSERT [Purchases&Agreements02_Def].[dbo].[GLAccount] ([nID], [nChoiceID], [tName]) VALUES (6, 6, N'9200');
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblProjectTable] ([nTableID], [tTableName], [nFileTypeSource], [nFileTypeTarget], [nEventID]) VALUES (185, N'GLAccount', 64, 5, 2);
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFieldValueTables] ([nID], [tName], [tSourceTableName], [fDelete], [tCaption], [fChoiceOrder], [nDSType], [fEditable], [dTimestamp], [tDependentTable]) VALUES (65, N'GLAccount', N'GLAccount', 0, N'GL Account', 1, 64, 1, NULL, NULL);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblTabs] ([nID], [tTabName], [tSubFormName], [tFormName], [tBoundTable], [tDataSource], [tDataSourceDefault]) VALUES (33, N'Alerts', NULL, NULL, N'tblDts', NULL, NULL);
GO

UPDATE [Purchases&Agreements02_Def].[dbo].tblDtsFields SET tCaption='Product Code', tLabelCaption='Product Code' WHERE nID=921
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (942, N'tblDts', 32, N'Asset_Type', 1, 103, 3, N'Asset Type', 0, 0, N'AssetType', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Asset Type', NULL, N'cbo_942_Asset_Type', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (943, N'tblDts', 32, N'Purchased_For_Department', 1, 103, 3, N'Purchased For Department', 0, 0, N'Department', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Department', NULL, N'cbo_943_Purchased_For_Department', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (950, N'tblDts', 32, N'Alert_0_Days', 1, 1, 50, N'Alert on Review Date', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'On Review Date', NULL, N'chk_950_Alert_0_Days', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (951, N'tblDts', 32, N'Review_Date', 1, 8, 50, N'Review Date', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Review Date', NULL, N'dt_951_Review_Date', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (952, N'tblDts', 32, N'Auto_Create_Assets', 1, 1, 50, N'Auto Create Assets', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Auto Create Assets', NULL, N'chk_952_Auto_Create_Assets', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (953, N'tblDts', 32, N'Reference_ID', 1, 10, 255, N'Reference ID', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Reference ID', NULL, N'txt_953_Reference_ID', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (944, N'tblDts', 32, N'Purchased_For_Location', 1, 103, 3, N'Purchased For Location', 0, 0, N'Location', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Location', NULL, N'cbo_944_Purchased_For_Location', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (949, N'tblDts', 32, N'Alert_7_Days', 1, 1, 50, N'Alert 7 Days Prior', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'7 Days Prior', NULL, N'chk_949_Alert_7_Days', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (945, N'tblDts', 32, N'GL_Account', 1, 103, 3, N'GL Account', 1, 0, N'GLAccount', 64, 1, 1, 1, NULL, 1, 1, NULL, N'GL Account', NULL, N'cbo_945_GL_Account', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (946, N'tblDts', 32, N'Alert_30_Days', 1, 1, 50, N'Alert 30 Days Prior', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'30 Days Prior', NULL, N'chk_946_Alert_30_Days', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (947, N'tblDts', 32, N'Alert_60_Days', 1, 1, 50, N'Alert 60 Days Prior', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'60 Days Prior', NULL, N'chk_947_Alert_60_Days', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (948, N'tblDts', 32, N'Alert_90_Days', 1, 1, 50, N'Alert 90 Days Prior', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'90 Days Prior', NULL, N'chk_948_Alert_90_Days', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (954, N'tblDts', 32, N'Process_Pending', 1, 103, 50, N'Process Pending', 0, 0, N'tblYesNo', 16, 1, 1, 1, NULL, 1, 1, NULL, N'New asset instances are pending creation', NULL, N'cbo_954_Process_Pending', 32, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (957, N'tblDts', 32, N'Stakeholders', 1, 104, 50, N'Stakeholders', 0, 0, N'tblUser', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Stakeholders', NULL, N'lst_957_Stakeholders', 33, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL)
GO

DELETE FROM [Purchases&Agreements02_Def].[dbo].tblSystemLayouts WHERE nID=7
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 5, N'Line #', 2, 906);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 10, N'Quantity', 7, 908);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 10, N'Total', 15, 910);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 0, N'ID', 1, 914);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 10, N'Product Code', 5, 921);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 10, N'Unit Price', 13, 909);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 20, N'Asset Type', 4, 942);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 40, N'Description', 16, 922);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (7, N'Left', 10, N'Start Date', 17, 897);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblNotification] ([nID], [nParentTableID], [tName], [tMailContent], [tDescription], [fFieldsChanged], [tCaption], [nWhenID], [nWhenParentTableID], [dEnabledFrom], [nTrigger], [nEnablePeriod], [tEnablePeriodUnit], [nMailTemplate], [nCalendarItem], [nReportID], [nReportFormat], [nReportArea]) VALUES (3, 17, N'Alert$7$Days$Before$Review$Date', N'Mail Template', NULL, 2, N'Alert 7 Days Prior Before Review Date', 3, 15, NULL, 1, 1, N'd', 23, NULL, NULL, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblNotification] ([nID], [nParentTableID], [tName], [tMailContent], [tDescription], [fFieldsChanged], [tCaption], [nWhenID], [nWhenParentTableID], [dEnabledFrom], [nTrigger], [nEnablePeriod], [tEnablePeriodUnit], [nMailTemplate], [nCalendarItem], [nReportID], [nReportFormat], [nReportArea]) VALUES (4, 17, N'Alert$30$Days$Before$Review$Date', N'Mail Template', N'', 2, N'Alert 30 Days Prior Before Review Date', 4, 15, NULL, 1, 1, N'd', 23, NULL, NULL, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblNotification] ([nID], [nParentTableID], [tName], [tMailContent], [tDescription], [fFieldsChanged], [tCaption], [nWhenID], [nWhenParentTableID], [dEnabledFrom], [nTrigger], [nEnablePeriod], [tEnablePeriodUnit], [nMailTemplate], [nCalendarItem], [nReportID], [nReportFormat], [nReportArea]) VALUES (5, 17, N'Alert$60$Days$Before$Review$Date', N'Mail Template', N'', 2, N'Alert 60 Days Prior Before Review Date', 5, 15, NULL, 1, 1, N'd', 23, NULL, NULL, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblNotification] ([nID], [nParentTableID], [tName], [tMailContent], [tDescription], [fFieldsChanged], [tCaption], [nWhenID], [nWhenParentTableID], [dEnabledFrom], [nTrigger], [nEnablePeriod], [tEnablePeriodUnit], [nMailTemplate], [nCalendarItem], [nReportID], [nReportFormat], [nReportArea]) VALUES (6, 17, N'Alert$90$Days$Before$Review$Date', N'Mail Template', N'', 2, N'Alert 90 Days Prior Before Review Date', 6, 15, NULL, 1, 1, N'd', 23, NULL, NULL, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblNotification] ([nID], [nParentTableID], [tName], [tMailContent], [tDescription], [fFieldsChanged], [tCaption], [nWhenID], [nWhenParentTableID], [dEnabledFrom], [nTrigger], [nEnablePeriod], [tEnablePeriodUnit], [nMailTemplate], [nCalendarItem], [nReportID], [nReportFormat], [nReportArea]) VALUES (7, 17, N'Alert$on$Review$Date', N'Mail Template', N'', 2, N'Alert on Review Date', 7, 15, NULL, 1, 1, N'd', 23, NULL, NULL, NULL, NULL);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblMail] ([nID], [tFrom], [tRecipients], [mCC], [tSubject], [mBodyText], [mAttachments], [bHTMLBody], [bSendIndividually], [nParentType], [bSendToQueue], [mBCC]) VALUES (23, N'Purchase Review Alert', N'', N'', N'Upcoming Purchase Review Date<F:Alert 30 Days Prior>', N'<table style="background: rgb(209, 219, 236); margin: 0px; width: 100%; height: 100%; padding-top: 3%; padding-bottom: 3%;">	<tbody>		<tr>			<td>			<table style="margin: 2% 10%; border: 1px solid rgb(146, 162, 181); border-image: none; width: 80%; border-collapse: collapse; background-color: white;">				<tbody>					<tr style="background-color: rgb(232, 238, 250);">						<td style="padding: 10px; height: 60px; font-family: verdana,geneva,sans-serif; border-right-color: currentColor; border-bottom-color: rgb(146, 162, 181); border-right-width: medium; border-bottom-width: 1px; border-right-style: none; border-bottom-style: solid;"><img alt="logo" src="http://localhost/connect/theme/images/logos/logol.gif" /></td>						<td style="padding: 10px; height: 60px; text-align: right; font-family: verdana,geneva,sans-serif; font-size: 10pt; border-bottom-color: rgb(146, 162, 181); border-left-color: currentColor; border-bottom-width: 1px; border-left-width: medium; border-bottom-style: solid; border-left-style: none;"><br />						Purchase &lt;F:Asset Type&gt; (ID: &lt;Issue Number&gt;)</td>					</tr>					<tr>						<td colspan="2" style="padding: 15px;">						<p style="text-align: center; font-family: verdana,geneva,sans-serif; font-size: 13pt;"><span style="font-family: Verdana, sans-serif; font-size: 13pt;">Your purchase of&nbsp;<strong>&lt;F:Asset Type&gt; </strong>has an upcoming review date</span></p>
						<p style="font-family: verdana,geneva,sans-serif; font-size: 13pt;"><span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">This is a reminder that the&nbsp;line item &lt;F:Line Item Number&gt;&nbsp;of a &lt;F:Sub Type&gt; of&nbsp;&lt;F:Asset Type&gt; is due for review on </span><span style="color: rgb(0, 92, 159);"><strong>&lt;F:Review Date&gt;</strong></span><span style="color: rgb(102, 102, 102);">.</span></span></span></p>
						<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">Start Date:&nbsp;<strong>&lt;F:Start Date&gt;</strong></span></span></span></div>
						<div><span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Date: <strong>&lt;F:End Date&gt;</strong></span></span></span></div>
						<div>						<div><span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Quantity: <strong>&lt;F:Line Item Quantity&gt;</strong></span></span></span></div>
						<div><span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total: $<strong>&lt;F:Line Item Total&gt;</strong></span></span></span></div>						</div>
						<div><br />						<span style="font-size: 10pt;"><span style="font-family: verdana,geneva,sans-serif;"><span style="color: rgb(102, 102, 102);">Sincerely,</span></span></span></div>
						<div>&nbsp;</div>
						<div><font color="#336699" face="Verdana" size="2">Vizor</font></div>						</td>					</tr>				</tbody>			</table>			</td>		</tr>	</tbody></table>
<div><p>&nbsp;</p></div>', N'', 1, 0, 3, 0, N'')
GO


INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomConditions] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [fHasTotalVariables]) VALUES (3, N'7$Days$Before$Review$Date', N'7 Days Before Review Date', 15, 2, 0);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomConditions] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [fHasTotalVariables]) VALUES (7, N'Review$Date', N'Review Date', 15, 2, 0);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomConditions] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [fHasTotalVariables]) VALUES (4, N'30$Days$Before$Review$Date', N'30 Days Before Review Date', 15, 2, 0);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomConditions] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [fHasTotalVariables]) VALUES (5, N'60$Days$Before$Review$Date', N'60 Days Before Review Date', 15, 2, 0);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomConditions] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [fHasTotalVariables]) VALUES (6, N'90$Days$Before$Review$Date', N'90 Days Before Review Date', 15, 2, 0);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (3, N'Total1', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 0, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (3, NULL, N'Alert 7 Days Prior', N'=', N'Yes', N'And', NULL, NULL, NULL, 2, 1, -1, 949);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (3, NULL, N'Review Date', N'=', N'<7 Days From Now>', NULL, NULL, NULL, NULL, 1, 2, -1, 951);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (4, NULL, N'Alert 30 Days Prior', N'=', N'Yes', N'And', NULL, NULL, NULL, 2, 1, -1, 946);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (4, N'Total1', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 0, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (4, NULL, N'Review Date', N'=', N'<30 Days From Now>', NULL, NULL, NULL, NULL, 1, 2, -1, 951);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (5, NULL, N'Alert 60 Days Prior', N'=', N'Yes', N'And', NULL, NULL, NULL, 2, 1, -1, 947);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (5, N'Total1', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 0, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (5, NULL, N'Review Date', N'=', N'<60 Days From Now>', NULL, NULL, NULL, NULL, 1, 2, -1, 951);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (6, NULL, N'Alert 90 Days Prior', N'=', N'Yes', N'And', NULL, NULL, NULL, 2, 1, -1, 948);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (6, N'Total1', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 0, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (6, NULL, N'Review Date', N'=', N'<90 Days From Now>', NULL, NULL, NULL, NULL, 1, 2, -1, 951);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (7, NULL, N'Alert on Review Date', N'=', N'Yes', N'And', NULL, NULL, NULL, 2, 1, -1, 950);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (7, N'Total1', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 0, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemConditions] ([nID], [tTotal], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [fWhenCondition], [nDtsFieldID]) VALUES (7, NULL, N'Review Date', N'=', N'<Today>', NULL, NULL, NULL, NULL, 1, 2, -1, 951);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (134, 0, N'Hide Fields By Sub Type', N'Hide Fields By Sub Type', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (135, 134, N'New Rule (135)', N'Other-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (136, 134, N'New Rule (136)', N'Services-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (137, 134, N'New Rule (137)', N'Upgrade License-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (138, 134, N'New Rule (138)', N'Maintenance-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (139, 134, N'New Rule (139)', N'<Empty>-', N'%Value0%-%Value1%', N'tblWrk_Hide_Fields_By_Sub_Type_134', 64, 1, 1, N'', NULL, 0, 26);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRule] ([nID], [nParentID], [tName], [tCaption], [tTmplNameRule], [tTableName], [nDBType], [nTrigger], [nState], [tDescription], [nValidationLevel], [bFinished], [nOrder]) VALUES (140, 104, N'New Rule (140)', N'Yes-Asset', N'%Value0%-%Value1%', N'tblWrk_Default_Values_By_Sub_Type_104', 64, 1, 1, N'', NULL, 0, 20);
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (186, 134, N'Sub Type', N'=', N'', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (187, 135, N'Sub Type', N'=', N'7', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (188, 136, N'Sub Type', N'=', N'4', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (189, 137, N'Sub Type', N'=', N'2', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (190, 138, N'Sub Type', N'=', N'3', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (191, 139, N'Sub Type', N'=', N'<Empty>', N'AND', 0, 0, 0, 0, 1, NULL, 894);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (192, 140, N'<New Issue>', N'=', N'1', N'AND', 0, 0, 0, 0, 1, NULL, -55);
INSERT [Purchases&Agreements02_Def].[dbo].[tblRuleCondition] ([nID], [nRuleID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [tValuesSource], [nFieldID]) VALUES (193, 140, N'Sub Type', N'=', N'8', N'AND', 0, 0, 0, 0, 2, NULL, 894);
GO

UPDATE [Purchases&Agreements02_Def].[dbo].tblPossibleValue SET tValue='894;908;906;942;896' WHERE nID=101
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (134, 134, NULL, NULL, 1, NULL, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (135, 135, N'', N'952', 1, 0, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (136, 136, N'', N'952', 1, 0, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (137, 137, N'', N'952', 1, 0, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (138, 138, N'', N'952', 1, 0, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (139, 139, N'', N'952', 1, 0, 2);
INSERT [Purchases&Agreements02_Def].[dbo].[tblPossibleValue] ([nID], [nRuleID], [tName], [tValue], [nRowID], [nFieldID], [nActionType]) VALUES (140, 140, N'Duration', N'1', 1, 896, 1);
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (954, 134, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (955, 134, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (956, 134, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (957, 134, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (958, 134, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (959, 134, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (960, 134, 3, 3);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (961, 134, 4, 3);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (962, 135, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (963, 135, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (964, 135, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (965, 135, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (966, 135, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (967, 135, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (968, 135, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (969, 135, 4, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (970, 136, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (971, 136, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (972, 136, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (973, 136, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (974, 136, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (975, 136, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (976, 136, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (977, 136, 4, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (978, 137, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (979, 137, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (980, 137, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (981, 137, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (982, 137, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (983, 137, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (984, 137, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (985, 137, 4, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (986, 138, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (987, 138, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (988, 138, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (989, 138, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (990, 138, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (991, 138, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (992, 138, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (993, 138, 4, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (994, 139, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (995, 139, 2, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (996, 139, 32, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (997, 139, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (998, 139, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (999, 139, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1000, 139, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1001, 139, 4, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1002, 140, 1, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1003, 140, 2, 5);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1004, 140, 32, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1005, 140, 64, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1006, 140, 128, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1007, 140, 256, 6);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1008, 140, 3, 4);
INSERT [Purchases&Agreements02_Def].[dbo].[tblUIElement_Rule] ([nID], [nRuleID], [nElementID], [nAttributeID]) VALUES (1009, 140, 4, 4);
GO


Use Resources01_Dat
GO

ALTER TABLE [Resources01_Dat].[dbo].tblDts ADD [Reference_ID] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
ALTER TABLE [Resources01_Dat].[dbo].tblDts ADD [Family] [int] NULL
GO


Use Resources02_Def
GO

UPDATE [Resources02_Def].[dbo].tblDtsFields SET tCaption='Purchase Reference', tLabelCaption='Purchase Reference' WHERE nID=846
INSERT [Resources02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (1132, N'tblDts', 32, N'Reference_ID', 1, 10, 255, N'Reference ID', 0, 0, NULL, NULL, 1, 1, 1, NULL, 1, 1, NULL, N'Reference ID', NULL, N'txt_1132_Reference_ID', 1, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL);
INSERT [Resources02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (1133, N'tblDts', 32, N'Family', 1, 103, 3, N'Family', 0, 0, N'Family', 16, 1, 1, 1, NULL, 1, 1, NULL, N'Family', NULL, N'cbo_1133_Family', 1, NULL, 0, -1, 1, NULL, NULL, NULL, 2, NULL)
GO

UPDATE [Resources02_Def].[dbo].tblPossibleValue Set tValue='26;23;34;40' WHERE nID=115
UPDATE [Resources02_Def].[dbo].tblPossibleValue SET tValue=tValue + ';1133' WHERE nID=70 AND tValue NOT LIKE '%1133%'
UPDATE [Resources02_Def].[dbo].tblPossibleValue SET tValue=tValue + ';1133' WHERE nID=71 AND tValue NOT LIKE '%1133%'
GO


Use Actions02_Def
GO

UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='23;24;25;28;31;32' WHERE nID = 2
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;24;25;28;31;32' WHERE nID = 3
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;24;25;28;31;32' WHERE nID = 4
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;25;28;31;32' WHERE nID = 5
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;24;25;31;32' WHERE nID = 6
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;24;28;31;32' WHERE nID = 7
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;24;25;28;31' WHERE nID = 32
UPDATE [Actions02_Def].[dbo].tblPossibleValue SET tValue='22;23;24;25;28;32;35' WHERE nID = 45
GO



USE [InventoriedSoftware02_Def]
GO

INSERT [InventoriedSoftware02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (825, N'tblDts', 2048, N'Family', 1, 103, 3, N'Software Family', 0, 0, N'Family', 16, 0, 0, 1, NULL, 0, 1, 0, N'Software Family', N'Asset_Type', N'cbo_825_Software_Family', 1, NULL, 0, 3, 1, NULL, NULL, NULL, 2, NULL)
GO

INSERT [InventoriedSoftware02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (14, N'Left', 10, NULL, 8, 825)
GO

USE [Users_mdb]
GO
CREATE TABLE [Users_mdb].[dbo].[Family](
	[nID] [int] NOT NULL,
	[tName] [varchar](255) NULL,
 CONSTRAINT [PK_Family] PRIMARY KEY CLUSTERED 
(
	[nID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

INSERT [Users_mdb].[dbo].[Family] ([nID], [tName]) VALUES (1, N'Microsoft Office')
GO
INSERT [Users_mdb].[dbo].[Family] ([nID], [tName]) VALUES (2, N'Microsoft Windows')
GO

INSERT [Users_mdb].[dbo].[tblDtsFieldValueTables] ([nID], [tName], [tSourceTableName], [fDelete], [tCaption], [fChoiceOrder], [nDSType], [fEditable], [dTimestamp], [tDependentTable]) VALUES (66, N'Family', N'Family', 0, N'Family', 0, 16, 1, NULL, NULL)
GO

INSERT [Users_mdb].[dbo].[tblProperty] ([nID], [tValue], [tName], [nType], [tDescription], [tValidationRule], [nCustomAction], [tCACaption], [tCADisplay], [tValueSourceTable]) VALUES (6, N'25', NULL, 1, N'MailQueue Page Size', NULL, NULL, NULL, NULL, NULL);
GO

DROP VIEW PurchaseLineItem
GO

CREATE VIEW PurchaseLineItem
AS
SELECT     A.nID, A.Line_Item_Number, A.Line_Item, A.Quantity, A.Line_Item_Description, A.Line_Item_Unit_Price, A.Line_Item_Total, A.Sub_Type, 
                      ISNULL(C.tBriefDescription, A.Line_Item_Description) + ' - Line #' + CAST(A.Line_Item_Number AS nvarchar) AS tName, A.Start_Date, A.End_Date, A.Line_Item_Status, A.Expires_, A.Asset_Type, 
                      A.Purchased_For_Department, A.Purchased_For_Location, C.Company, C.PO_Number, C.Invoice_Date, C.Invoice_Number, C.tBriefDescription, C.Auto_Renew, 
                      C.Auto_Renewal_Date, C.Auto_Renewal_Interval, C.nSubstateID, C.nOriginatorID, C.SubTotal, C.Total_with_Tax, C.Account_Number, C.Requisition_Number, 
                      C.nID AS nPurchaseID
FROM         [Purchases&Agreements01_Dat].dbo.tblDts AS A LEFT OUTER JOIN
                      [Purchases&Agreements01_Dat].dbo.tblLineItem AS B ON A.nID = B.nRelID LEFT OUTER JOIN
                      [Purchases&Agreements01_Dat].dbo.tblDts AS C ON B.nID = C.nID
WHERE     (A.Type = 3)
GO


USE censusweb_mdb
GO

INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (68, NULL, 825, 9, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (20, NULL, 1133, 26, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (24, NULL, 1133, 22, 2)
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (20, 1133, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (24, 1133, 79, N'yes', NULL)
GO

UPDATE LicenseManager02_Def.dbo.tblKeyType SET tName='Standard' WHERE tName='Key is Single-line'
UPDATE LicenseManager02_Def.dbo.tblKeyType SET tName='Multi-Line' WHERE tName='Key is Multi-line'
UPDATE LicenseManager02_Def.dbo.tblKeyType SET tName='File' WHERE tName='Key is a file'
GO

/*Purchase Details tab in Asset Library */
USE [censusweb_mdb]
GO

/*remove*/
DELETE FROM censusweb_mdb.dbo.tblView where nViewID=44 and nFieldID in (SELECT nID from Resources02_Def.dbo.tblDtsFields where nDestinationTabID = (SELECT nID from Resources02_Def.dbo.tblTabs WHERE tTabName='Purchase Details'))
DELETE FROM [censusweb_mdb].dbo.tblFieldAttribute where nViewID=44 and nFieldID=846
GO

/*add back*/
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 841, 5, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 842, 13, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 843, 10, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 844, 8, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 845, 15, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 846, 1, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 847, 16, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 904, 2, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 916, 4, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 922, 3, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 923, 6, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 964, 7, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 965, 9, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 966, 11, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 967, 12, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 1118, 14, 2)
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (44, 846, 79, N'yes', NULL)
GO

/*Line Item tab in add purchases*/

/*remove*/
delete FROM [censusweb_mdb].[dbo].tblView where nViewID=47 and nFieldID in (SELECT nID from [Purchases&Agreements02_Def].dbo.tblDtsFields where nDestinationTabID = (SELECT nID from [Purchases&Agreements02_Def].dbo.tblTabs WHERE tTabName='Line Item'))
delete FROM [censusweb_mdb].[dbo].tblFieldAttribute where nViewID=47 and nFieldID in (SELECT nID from [Purchases&Agreements02_Def].dbo.tblDtsFields where nDestinationTabID = (SELECT nID from [Purchases&Agreements02_Def].dbo.tblTabs WHERE tTabName='Line Item'))
GO

/*add back*/

INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 894, 2, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 896, 11, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 897, 12, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 898, 13, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 906, 1, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 907, 19, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 908, 6, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 909, 7, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 910, 8, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 914, 18, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 921, 5, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 922, 10, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 923, 3, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 942, 4, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 943, 14, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 952, 9, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 953, 17, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 944, 15, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 945, 16, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (47, NULL, 954, 20, 2)
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 894, 91, N'Specifies the type of purchase transaction. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 896, 14, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 896, 60, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 896, 91, N'Specifies the duration for which the purchased items are available. Leased or rental purchases should be marked as Temporary. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 897, 91, N'Specifies when the purchased items are available from.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 898, 55, N'</td></tr><tr><td colspan=4><hr /> ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 898, 91, N'Specifies when temporary purchased items are available until.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 906, 11, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 906, 63, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 906, 91, N'Uniquely identifies a line item within an invoice. This value is automatically generated sequentially. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 907, 56, N'no', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 908, 91, N'The total quantity of this asset purchased at this time. If you choose to ‘Auto Create Assets’, the quantity of assets specified will be created for you.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 909, 91, N'The total quantity of this asset purchased at this time. If you choose to ‘Auto Create Assets’, the quantity of assets specified will be created for you.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 910, 55, N'<script language="javascript" src="../js/UnitPriceCalc.js"></script>', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 910, 56, N'no', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 910, 66, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 910, 102, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 914, 56, N'no', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 921, 91, N'Uniquely identifies a product. This is typically provided by the manufacturer or supplier of the asset.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 922, 23, N'3', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 922, 71, N'none', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 922, 91, N'Free form text field detailing the line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 923, 91, N'Specifies the current lifecycle status of this line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 942, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 942, 91, N'Specifies the type (or category) of asset purchased. If you choose to ‘Auto Create Assets’, assets of this type will be created for you.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 943, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 943, 91, N'Allocate this line item to the department for which this purchase was required for.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 952, 91, N'Enabling this option will automatically generate assets in the asset library based on the specified quantity and asset type of this line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 952, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 944, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 944, 91, N'Allocate this line item to the location for which this purchase was required for.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 945, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 945, 91, N'Allocate this line item to the appropriate general ledger account', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (47, 954, 56, N'no', NULL)
GO


/*Line Item tab in edit purchases*/

/*remove*/
delete FROM [censusweb_mdb].dbo.tblView where nViewID=48 and nFieldID in (SELECT nID from [Purchases&Agreements02_Def].dbo.tblDtsFields where nDestinationTabID = (SELECT nID from [Purchases&Agreements02_Def].dbo.tblTabs WHERE tTabName='Line Item'))
delete FROM [censusweb_mdb].dbo.tblFieldAttribute where nViewID=48 and nFieldID in (SELECT nID from [Purchases&Agreements02_Def].dbo.tblDtsFields where nDestinationTabID = (SELECT nID from [Purchases&Agreements02_Def].dbo.tblTabs WHERE tTabName='Line Item'))
GO

/*add back*/
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 894, 2, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 896, 11, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 897, 12, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 898, 13, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 906, 1, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 908, 6, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 909, 7, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 910, 8, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 914, 18, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 921, 5, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 922, 10, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 923, 3, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 942, 4, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 943, 14, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 950, 2, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 951, 1, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 952, 9, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 953, 17, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 944, 15, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 949, 3, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 945, 16, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 946, 4, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 947, 5, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 948, 6, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 954, 19, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (48, NULL, 957, 7, 2)
GO


INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 894, 91, N'Specifies the type of purchase transaction. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 896, 14, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 896, 60, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 896, 91, N'Specifies the duration for which the purchased items are available. Leased or rental purchases should be marked as Temporary.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 897, 91, N'Specifies when the purchased items are available from.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 898, 55, N'</td></tr><tr><td colspan=4><hr /> ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 898, 91, N'Specifies when temporary purchased items are available until.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 906, 11, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 906, 63, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 906, 91, N'Uniquely identifies a line item within an invoice. This value is automatically generated sequentially. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 908, 91, N'The total quantity of this asset purchased at this time. If you choose to ‘Auto Create Assets’, the quantity of assets specified will be created for you.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 909, 91, N'The cost of each individual asset purchased. ', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 910, 55, N'<script language="javascript" src="../js/UnitPriceCalc.js"></script>', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 910, 82, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 921, 91, N'Uniquely identifies a product. This is typically provided by the manufacturer or supplier of the asset.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 922, 23, N'3', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 922, 71, N'none', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 922, 91, N'Free form text field detailing the line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 923, 91, N'Specifies the current lifecycle status of this line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 942, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 942, 91, N'Specifies the type (or category) of asset purchased. If you choose to ‘Auto Create Assets’, assets of this type will be created for you.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 943, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 943, 91, N'Allocate this line item to the department for which this purchase was required for.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 950, 27, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 950, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 951, 2, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 951, 64, N'SpanTwoWidthOne', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 952, 91, N'Enabling this option will automatically generate assets in the asset library based on the specified quantity and asset type of this line item.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 952, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 944, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 944, 91, N'Allocate this line item to the location for which this purchase was required for.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 949, 27, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 949, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 945, 79, N'yes', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 945, 91, N'Allocate this line item to the appropriate general ledger account.', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 946, 27, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 946, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 947, 27, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 947, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 948, 27, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 948, 95, N'fld_switch.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 954, 14, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 954, 95, N'fld_ProcessPending.htmpl', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 957, 17, N'2', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 957, 59, N'MemoFieldWidth', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 946, 91, N'Send e-mail alert to the specified stakeholders 30 days prior to the review date', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 947, 91, N'Send e-mail alert to the specified stakeholders 60 days prior to the review date', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 948, 91, N'Send e-mail alert to the specified stakeholders 90 days prior to the review date', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 949, 91, N'Send e-mail alert to the specified stakeholders 7 days prior to the review date', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 950, 91, N'Send e-mail alert to the specified stakeholders on the review date', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (48, 951, 91, N'Date on which to base the e-mail alerts to be sent to the specified stakeholders', NULL)
GO


INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (54, NULL, 762, 21, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (54, 762, 56, N'no', NULL)
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (46, NULL, 942, 13, 2)
GO
UPDATE [censusweb_mdb].dbo.tblView SET nFieldIndex=39 WHERE nViewID=44 and nFieldID=1092 and nFieldIndex=33
GO
UPDATE [censusweb_mdb].dbo.tblView SET nFieldIndex=33 WHERE nViewID=44 and nFieldID=1093 and nFieldIndex=34
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (44, NULL, 1132, 34, 2)
GO

INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (54, NULL, 751, 24, 2)
GO
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (54, 751, 56, N'no', NULL)
GO

/** Add the new features control access to all departments and locations	**/
USE [Licenses_mdb]
GO

INSERT [Licenses_mdb].[dbo].[tblFeatures] ([nID], [tName], [fVisible], [tFunctionName], [tFormName], [nMode]) VALUES (131, N'Access all Departments', 1, N'', N'', 0);
INSERT [Licenses_mdb].[dbo].[tblFeatures] ([nID], [tName], [fVisible], [tFunctionName], [tFormName], [nMode]) VALUES (132, N'Access all Locations', 1, N'', N'', 0);
GO

/** Add the new features to admins, IT Managers, Asset Manager and Software Managers by default	**/
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'Admins', 131, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'Admins', 132, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'IT Asset Managers', 131, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'IT Asset Managers', 132, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'IT Managers', 131, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'IT Managers', 132, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'SoftwareManagers', 131, 1);
INSERT [Licenses_mdb].[dbo].[tblGroupPrivileges] ([tGroup], [nFeatureID], [fEnabled]) VALUES (N'SoftwareManagers', 132, 1);
GO

INSERT [Licenses_mdb].[dbo].[tblProjectDS] ([nProjectId], [tName], [tLocation], [tAltLocation], [nDSType], [nProviderType], [nSecurityDB], [tSecurityAccess], [tAltConnString], [nAltConnStringOperation], [nOrder]) VALUES (22, N'Roles01_Dat', (SELECT tLocation FROM [Licenses_mdb].dbo.tblProjectDS WHERE nProjectId=14 AND nDSType=32), (SELECT tAltLocation FROM [Licenses_mdb].dbo.tblProjectDS WHERE nProjectId=14 AND nDSType=32), 4096, 2, 0, N'internal', NULL, 1, 0);
GO

/** Add the new macros	**/
USE [Resources02_Def]
GO

INSERT [Resources02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (63, N'<Is Accessible Department>', N'IsAccessibleDepartment', NULL, 2, 0, NULL, NULL);
INSERT [Resources02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (64, N'<Is Accessible Location>', N'IsAccessibleLocation', NULL, 2, 0, NULL, NULL);
INSERT [Resources02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (65, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [Resources02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (66, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

USE [HelpDesk02_Def]
GO

INSERT [HelpDesk02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (63, N'<Is Accessible Department>', N'IsAccessibleDepartment', NULL, 2, 0, NULL, NULL);
INSERT [HelpDesk02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (64, N'<Is Accessible Location>', N'IsAccessibleLocation', NULL, 2, 0, NULL, NULL);
INSERT [HelpDesk02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (65, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [HelpDesk02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (66, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

USE [LicenseManager02_Def]
GO

INSERT [LicenseManager02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (63, N'<Is Accessible Department>', N'IsAccessibleDepartment', NULL, 2, 0, NULL, NULL);
INSERT [LicenseManager02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (64, N'<Is Accessible Location>', N'IsAccessibleLocation', NULL, 2, 0, NULL, NULL);
INSERT [LicenseManager02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (65, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [LicenseManager02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (66, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

INSERT [LicenseManager02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (762, N'PurchaseLineItem', 16, N'Asset_Type', 1, 103, 3, N'[Related Purchase Line Item] Asset Type', 0, 0, N'tblDts', 2048, 0, 0, 1, N'1', 0, 1, 680, N'Asset Type', N'nID;nID|nRelID;nID', N'762', 3, NULL, 0, 6, 1, NULL, N'nID', N'tBriefDescription', 2, NULL)
INSERT [LicenseManager02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (763, N'PurchaseLineItem', 16, N'Purchased_For_Department', 1, 103, 3, N'[Related Purchase Line Item] Department', 0, 0, N'Department', 16, 0, 0, 1, N'1', 0, 1, 680, N'Department', N'nID;nID|nRelID;nID', N'763', 3, NULL, 0, 6, 1, NULL, NULL, NULL, 2, NULL)
INSERT [LicenseManager02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (764, N'PurchaseLineItem', 16, N'Purchased_For_Location', 1, 103, 3, N'[Related Purchase Line Item] Location', 0, 0, N'Location', 16, 0, 0, 1, N'1', 0, 1, 680, N'Location', N'nID;nID|nRelID;nID', N'764', 3, NULL, 0, 6, 1, NULL, NULL, NULL, 2, NULL)
GO

INSERT [LicenseManager02_Def].[dbo].[tblSystemLayouts] ([nID], [tAlign], [nWidth], [tTitle], [nRow], [nDtsFieldID]) VALUES (22, N'Left', 0, N'Purchase ID', 15, 751)
GO

USE censusweb_mdb
GO

INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (54, NULL, 763, 22, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (54, NULL, 764, 23, 2);
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (54, 763, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (54, 764, 56, N'no', NULL);
GO

USE [Purchases&Agreements02_Def]
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (63, N'<Is Accessible Department>', N'IsAccessibleDepartment', NULL, 2, 0, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (64, N'<Is Accessible Location>', N'IsAccessibleLocation', NULL, 2, 0, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (65, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [Purchases&Agreements02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (66, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

USE [Users_mdb]
GO

INSERT [Users_mdb].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (63, N'<Is Accessible Department>', N'IsAccessibleDepartment', NULL, 2, 0, NULL, NULL);
INSERT [Users_mdb].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (64, N'<Is Accessible Location>', N'IsAccessibleLocation', NULL, 2, 0, NULL, NULL);
INSERT [Users_mdb].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (65, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [Users_mdb].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (66, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

USE [Actions02_Def]
GO

INSERT [Actions02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (69, N'<7 Days From Now>', N'GetMacro7DaysFromNow', NULL, 1, 12, NULL, NULL);
INSERT [Actions02_Def].[dbo].[tblMacros] ([ID], [tName], [tFunctionName], [tTableName], [nType], [nUsageType], [tValuesSource], [tDisplayName]) VALUES (70, N'<30 Days From Now>', N'GetMacro30DaysFromNow', NULL, 1, 12, NULL, NULL);
GO

/*add the helpdesk related issues view */

USE censusweb_mdb
GO

INSERT [censusweb_mdb].[dbo].[tblWebViews] ([nViewID], [tViewName], [nProjectID], [tFileLocation], [tAlias], [nTimeOut], [bLocked], [tLastFileLocation], [bGenerated], [nWebSite], [nMaxLinesPerPage], [tWebServer], [tVdPath], [nFeatureId], [bIntegrateSCC], [bReadOnly], [tURL], [tAnonUser], [tAnonPwd], [nVDInfoDirty], [dLastGen], [dNextGen]) VALUES (80, N'RelatedIssues', 4, (SELECT [tFileLocation] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), N'connect', NULL, 0, (SELECT [tLastFileLocation] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), 0, (SELECT [nWebSite] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), NULL, (SELECT [tWebServer] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), (SELECT [tVdPath] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), 8191, 0, 0, (SELECT [tURL] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), (SELECT [tAnonUser] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), (SELECT [tAnonPwd] FROM  [censusweb_mdb].[dbo].tblWebViews WHERE nViewID=1), -1, NULL, NULL)
GO

INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 6, N'66,70,71');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 8, N'HelpDesk / RelatedIssues');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 9, N'yes');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 13, N'18');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 14, N'1');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 15, N'2');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 27, N'Manage help desk incidents throughout their support life cycle');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 28, N'an');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 36, N'yes');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 21, N'93');
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (80, 29, N'no');
GO

INSERT [censusweb_mdb].[dbo].[tblWebSectionDV] ([nViewID], [nDataViewID], [nSectionID], [nQueryID], [nOrder]) VALUES (80, 1, 0, 1, 0);
GO

INSERT [censusweb_mdb].[dbo].[tblViewGroupAccess] ([tGroup], [nViewID], [nAccessType]) VALUES (N'HelpDesk-Analysts', 80, NULL);
INSERT [censusweb_mdb].[dbo].[tblViewGroupAccess] ([tGroup], [nViewID], [nAccessType]) VALUES (N'HelpDesk-GroupLeads', 80, NULL);
INSERT [censusweb_mdb].[dbo].[tblViewGroupAccess] ([tGroup], [nViewID], [nAccessType]) VALUES (N'IT Managers', 80, NULL);
INSERT [censusweb_mdb].[dbo].[tblViewGroupAccess] ([tGroup], [nViewID], [nAccessType]) VALUES (N'Admins', 80, NULL);
GO

INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 1, 1, 0);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 2, 1, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 3, 1, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 4, 1, 20);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 5, 1, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 6, 1, 30);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 7, 1, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 1, 2, 0);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 2, 2, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 3, 2, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 4, 2, 20);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 5, 2, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 6, 2, 30);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 7, 2, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 1, 3, 0);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 2, 3, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 3, 3, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 4, 3, 20);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 5, 3, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 6, 3, 30);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 7, 3, 10);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 1, 4, 0);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 2, 4, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 3, 4, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 4, 4, 32);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 5, 4, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 6, 4, 50);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 7, 4, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 1, 5, 0);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 2, 5, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 3, 5, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 4, 5, 32);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 5, 5, 5);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 6, 5, 50);
INSERT [censusweb_mdb].[dbo].[TblViewFrameSettings] ([nViewID], [nFrameID], [nResID], [nFrameSize]) VALUES (80, 7, 5, 5);
GO

INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 50, 1, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 54, 1, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 55, 1, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 364, 1, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 866, 1, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 12, 2, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 13, 2, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 42, 2, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 355, 2, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 798, 2, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 51, 3, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 352, 3, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 800, 3, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 865, 3, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 21, 4, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 43, 3, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 52, 4, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 56, 4, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 66, 4, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 20, 5, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 45, 4, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 60, 5, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 799, 5, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 61, 6, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 65, 5, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 350, 6, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 864, 6, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 57, 7, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 62, 7, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 64, 6, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 2, 8, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 11, 8, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 48, 7, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 3, 9, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 332, 9, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 573, 8, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 7, 10, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 18, 10, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 574, 9, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 8, 11, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 19, 11, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 575, 10, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 9, 12, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 30, 12, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 576, 11, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 10, 13, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 29, 13, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 578, 12, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 5, 14, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 579, 13, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 810, 14, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 6, 15, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 580, 14, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 809, 15, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 334, 16, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 581, 15, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 600, 16, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 32, 17, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 44, 16, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 353, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 354, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 494, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 495, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 496, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 497, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 521, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 522, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 523, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 524, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 525, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 526, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 538, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 539, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 555, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 563, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 564, 0, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (80, NULL, 565, 0, 2);
GO

INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 7, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 8, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 10, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 11, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 12, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 13, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 15, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 16, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 17, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 18, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 19, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 21, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 22, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 25, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 27, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 28, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 29, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 30, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 31, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 32, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 33, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 34, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 80, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 81, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 83, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 84, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 85, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 86, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 87, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 88, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 89, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 90, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 91, 2);
INSERT [censusweb_mdb].[dbo].[tblQuery] ([nViewID], [nQueryID], [nStatus]) VALUES (80, 92, 2);
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 50, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 50, 95, N'fld_Header1_NoCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 55, 22, N'1', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 55, 55, N'<script>document.write(parent.objCustomCode.getCodeAfterField(''%fieldname%'',''mem_56_mem_56_ActivityLog'','''',''mem_864_864'',''chk_865_865''))</script>', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 364, 14, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 364, 60, N'SpanTwoWidthOne', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 42, 14, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 42, 95, N'fld_Header2_NoCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 798, 55, N'<script type="text/javascript">m_objTimer%fieldID%.ConfigTimer(''55'',''799'');document.getElementById(''MqF_55'').colSpan=''2'';</script>', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 800, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 43, 4, N'E-mail', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 43, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 43, 95, N'fld_RO_NoCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 56, 55, N'<script type=''text/javascript''>document.write(parent.objCustomCode.getCodeAfterField(''%fieldname%'',''''));</script>', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 56, 71, N'html', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 66, 68, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 66, 69, N'../../RC/rcviewer.asp?Client=%fieldvalue%&gw=', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 66, 70, N'RemoteControl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 45, 4, N'Telephone', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 45, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 45, 95, N'fld_RO_DimCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 799, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 65, 14, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 65, 95, N'fld_RO_DimCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 864, 55, N'<script type=''text/javascript''>document.write(parent.objCustomCode.getCodeAfterField(''%fieldname%'',''''));</script>', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 864, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 864, 71, N'html', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 64, 14, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 64, 95, N'fld_RO_DimCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 48, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 48, 95, N'fld_RO_DimCaption.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 332, 79, N'yes', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 573, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 574, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 575, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 30, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 30, 6, N'73', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 30, 62, N'MemoFieldWidth', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 576, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 29, 71, N'html', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 29, 95, N'fld_12_9.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 578, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 579, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 810, 79, N'yes', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 810, 95, N'fldAssetsList.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 580, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 809, 79, N'yes', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 809, 95, N'fldAssetsList.htmpl', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 581, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 600, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 32, 5, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 32, 62, N'AttachmentsSpanTwo', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 44, 14, N'2', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (80, 44, 95, N'fld_RO_NoCaption.htmpl', NULL);
GO

USE LicenseManager02_Def
GO
INSERT [LicenseManager02_Def].[dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) VALUES (123, N'Base$Licenses', N'Base Licenses', 6, 2, NULL, NULL)
GO

INSERT [LicenseManager02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (123, N'[Related Purchase Line Item] Department', N'=', N'<Is Accessible Department>', N'Or', NULL, NULL, 1, 0, 1, 763, NULL)
INSERT [LicenseManager02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (123, N'    [Related Purchase Line Item] Location', N'=', N'<Is Accessible Location>', N'Or', 1, 1, NULL, 0, 2, 764, NULL)
GO


USE [Purchases&Agreements02_Def]
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (955, N'PurchaseLineItem', 16, N'Purchased_For_Department', 1, 103, 3, N'Purchase Department', 0, 0, N'Department', 16, 0, 0, 1, N'1', 0, 1, 911, N'Purchase Department', N'nID;nID|nRelID;nID', N'955', 3, NULL, 0, 6, 1, NULL, NULL, NULL, 2, NULL)
INSERT [Purchases&Agreements02_Def].[dbo].[tblDtsFields] ([nID], [tTableName], [nTableDSType], [tName], [nDataViewID], [nDataType], [nDataSize], [tCaption], [fChoiceOrder], [fRequired], [tFieldValuesTable], [nValueTableDSType], [fEnabled], [fKeepHistory], [fCanQueryBy], [tDestinationTab], [fEditable], [fVisible], [nRelatedField], [tLabelCaption], [tAliasSourceTable], [tBoundControlName], [nDestinationTabID], [tWhere], [fIncludeInDefaultReports], [nRelationshipType], [nContainerType], [nControlType], [tValueTableIDFld], [tValueTableNameFld], [nRevisionNumber], [tOrigCaption]) VALUES (956, N'PurchaseLineItem', 16, N'Purchased_For_Location', 1, 103, 3, N'Purchase Location', 0, 0, N'Location', 16, 0, 0, 1, N'1', 0, 1, 911, N'Purchase Location', N'nID;nID|nRelID;nID', N'956', 3, NULL, 0, 6, 1, NULL, NULL, NULL, 2, NULL)
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemCustomQueries] ([nID], [tName], [tCaption], [nParentTableID], [fFieldsChanged], [nDefaultSort], [nDefaultLayout]) VALUES (33, N'All', N'All', 6, 2, NULL, NULL)
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (33, N'Purchase Department', N'=', N'<Is Accessible Department>', N'Or', NULL, NULL, 1, 0, 1, 955, NULL)
INSERT [Purchases&Agreements02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (33, N'    Purchase Location', N'=', N'<Is Accessible Location>', NULL, 1, 1, NULL, 0, 2, 956, NULL)
GO

INSERT [Purchases&Agreements02_Def].[dbo].[tblWho] ([nID], [nSelectedID]) VALUES (3, -7)
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblWho] ([nID], [nSelectedID]) VALUES (4, -7)
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblWho] ([nID], [nSelectedID]) VALUES (5, -7)
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblWho] ([nID], [nSelectedID]) VALUES (6, -7)
GO
INSERT [Purchases&Agreements02_Def].[dbo].[tblWho] ([nID], [nSelectedID]) VALUES (7, -7)
GO

USE censusweb_mdb
GO
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (46, NULL, 955, 34, 2);
INSERT [censusweb_mdb].[dbo].[tblView] ([nViewID], [nTabID], [nFieldID], [nFieldIndex], [nStatus]) VALUES (46, NULL, 956, 35, 2);
GO

INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (46, 955, 56, N'no', NULL);
INSERT [censusweb_mdb].[dbo].[tblFieldAttribute] ([nViewID], [nFieldID], [nAttributeID], [tAttributeValue], [nStatus]) VALUES (46, 956, 56, N'no', NULL);
GO


USE Resources02_Def
GO
INSERT [Resources02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (24, N'Allocated to Department', N'=', N'<Is Accessible Department>', N'Or', NULL, NULL, 1, 5, 6, 1019, NULL)
INSERT [Resources02_Def].[dbo].[tblSystemQueries] ([nID], [tName], [tTest], [tValue], [tAndOr], [nLevel], [nParent], [nChild], [nBrother], [nRow], [nDtsFieldID], [nValueType]) VALUES (24, N'    Current Location', N'=', N'<Is Accessible Location>', NULL, 1, 6, NULL, 0, 7, 1087, NULL)
GO


USE censusweb_mdb
GO

UPDATE [censusweb_mdb].[dbo].[tblWebViewAttribute] SET [tValue]='123' WHERE [nViewID] =54 AND [nViewAttributeID]=21 AND [tValue]='115'
GO
INSERT [censusweb_mdb].[dbo].[tblWebViewAttribute] ([nViewID], [nViewAttributeID], [tValue]) VALUES (46, 21, N'33')
GO
