[dbo].[RevenueRatingImportedHeaderReduction]
CREATE TABLE [dbo].[RevenueRatingImportedHeaderReduction]
(
[RevenueRatingImportedHeaderReductionID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportedHeaderFID] [int] NOT NULL,
[BillingMajorReductionFID] [int] NULL,
[ReductionTypeFID] [int] NOT NULL,
[ReductionBasisFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Percentage] [decimal] (10, 3) NULL,
[ReductionAmount] [money] NOT NULL CONSTRAINT [DF_RevenueRatingImportedHeaderReduction_ReductionAmount] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedHeaderReduction] ADD CONSTRAINT [PK_RevenueRatingImportedHeaderReduction] PRIMARY KEY NONCLUSTERED ([RevenueRatingImportedHeaderReductionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedHeaderReduction_RevenueRatingImportedHeaderFID] ON [dbo].[RevenueRatingImportedHeaderReduction] ([RevenueRatingImportedHeaderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedHeaderReduction] ADD CONSTRAINT [FK_RevenueRatingImportedHeaderReduction_ReductionBasis] FOREIGN KEY ([ReductionBasisFID]) REFERENCES [dbo].[ReductionBasis] ([ReductionBasisID])
GO
ALTER TABLE [dbo].[RevenueRatingImportedHeaderReduction] ADD CONSTRAINT [FK_RevenueRatingImportedHeaderReduction_ReductionType] FOREIGN KEY ([ReductionTypeFID]) REFERENCES [dbo].[ReductionType] ([ReductionTypeID])
GO
ALTER TABLE [dbo].[RevenueRatingImportedHeaderReduction] ADD CONSTRAINT [FK_RevenueRatingImportedHeaderReduction_RevenueRatingImportedHeader] FOREIGN KEY ([RevenueRatingImportedHeaderFID]) REFERENCES [dbo].[RevenueRatingImportedHeader] ([RevenueRatingImportedHeaderID])
GO
GRANT SELECT ON [dbo].[RevenueRatingImportedHeaderReduction] TO [MssExec]
GRANT INSERT ON [dbo].[RevenueRatingImportedHeaderReduction] TO [MssExec]
GRANT DELETE ON [dbo].[RevenueRatingImportedHeaderReduction] TO [MssExec]
GRANT UPDATE ON [dbo].[RevenueRatingImportedHeaderReduction] TO [MssExec]
GO