CREATE TABLE [dbo].[ARCAlertCriteria]
(
[ARCAlertCriteriaID] [int] NOT NULL IDENTITY(1, 1),
[ARCAlertCriteriaGroupFID] [int] NOT NULL,
[ARCCriteriaDefinitionFID] [int] NOT NULL,
[Value1] [decimal] (12, 2) NULL,
[Value2] [decimal] (12, 2) NULL,
[SQLClause] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCAlertCriteria] ADD CONSTRAINT [PK_ARCAlertCriteria] PRIMARY KEY NONCLUSTERED ([ARCAlertCriteriaID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCAlertCriteria] ADD CONSTRAINT [FK_ARCAlertCriteria_ARCAlertCriteriaGroup] FOREIGN KEY ([ARCAlertCriteriaGroupFID]) REFERENCES [dbo].[ARCAlertCriteriaGroup] ([ARCAlertCriteriaGroupID])
GO
ALTER TABLE [dbo].[ARCAlertCriteria] ADD CONSTRAINT [FK_ARCAlertCriteria_ARCCriteriaDefinition] FOREIGN KEY ([ARCCriteriaDefinitionFID]) REFERENCES [dbo].[ARCCriteriaDefinition] ([ARCCriteriaDefinitionID])
GO
GRANT SELECT ON [dbo].[ARCAlertCriteria] TO [MssExec]
GRANT INSERT ON [dbo].[ARCAlertCriteria] TO [MssExec]
GRANT DELETE ON [dbo].[ARCAlertCriteria] TO [MssExec]
GRANT UPDATE ON [dbo].[ARCAlertCriteria] TO [MssExec]
GO