[dbo].[RevenueRatingImportedDetailReduction]
CREATE TABLE [dbo].[RevenueRatingImportedDetailReduction]
(
[RevenueRatingImportedDetailReductionID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportedDetailFID] [int] NOT NULL,
[BillingMinorReductionFID] [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_RevenueRatingImportedDetailReduction_ReductionAmount] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetailReduction] ADD CONSTRAINT [PK_RevenueRatingImportedDetailReduction] PRIMARY KEY NONCLUSTERED ([RevenueRatingImportedDetailReductionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedDetailReduction_RevenueRatingImportedDetailFID] ON [dbo].[RevenueRatingImportedDetailReduction] ([RevenueRatingImportedDetailFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportedDetailReduction_ReductionBasis] FOREIGN KEY ([ReductionBasisFID]) REFERENCES [dbo].[ReductionBasis] ([ReductionBasisID])
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportedDetailReduction_ReductionType] FOREIGN KEY ([ReductionTypeFID]) REFERENCES [dbo].[ReductionType] ([ReductionTypeID])
GO
ALTER TABLE [dbo].[RevenueRatingImportedDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportedDetailReduction_RevenueRatingImportedDetail] FOREIGN KEY ([RevenueRatingImportedDetailFID]) REFERENCES [dbo].[RevenueRatingImportedDetail] ([RevenueRatingImportedDetailID])
GO
GRANT SELECT ON [dbo].[RevenueRatingImportedDetailReduction] TO [MssExec]
GRANT INSERT ON [dbo].[RevenueRatingImportedDetailReduction] TO [MssExec]
GRANT DELETE ON [dbo].[RevenueRatingImportedDetailReduction] TO [MssExec]
GRANT UPDATE ON [dbo].[RevenueRatingImportedDetailReduction] TO [MssExec]
GO