[dbo].[ReductionTemplateRateLookupRange]
CREATE TABLE [dbo].[ReductionTemplateRateLookupRange]
(
[ReductionTemplateRateLookupRangeID] [int] NOT NULL IDENTITY(1, 1),
[ReductionTemplateRateLookupFID] [int] NOT NULL,
[Minimum] [decimal] (12, 2) NOT NULL,
[Maximum] [decimal] (12, 2) NOT NULL,
[Rate] [decimal] (10, 3) NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReductionTemplateRateLookupRange] ADD CONSTRAINT [CK_ReductionTemplateRateLookupRange_ValidRange] CHECK (((1)=[dbo].[ReductionTemplateRateValidRange]([ReductionTemplateRateLookupFID],[Minimum],[Maximum])))
GO
ALTER TABLE [dbo].[ReductionTemplateRateLookupRange] ADD CONSTRAINT [PK_ReductionTemplateRateLookupRange] PRIMARY KEY NONCLUSTERED ([ReductionTemplateRateLookupRangeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReductionTemplateRateLookupRange] ADD CONSTRAINT [FK_ReductionTemplateRateLookupRange_ReductionTemplateRateLookup] FOREIGN KEY ([ReductionTemplateRateLookupFID]) REFERENCES [dbo].[ReductionTemplateRateLookup] ([ReductionTemplateRateLookupID])
GO
GRANT SELECT ON [dbo].[ReductionTemplateRateLookupRange] TO [MssExec]
GRANT INSERT ON [dbo].[ReductionTemplateRateLookupRange] TO [MssExec]
GRANT DELETE ON [dbo].[ReductionTemplateRateLookupRange] TO [MssExec]
GRANT UPDATE ON [dbo].[ReductionTemplateRateLookupRange] TO [MssExec]
GO