[dbo].[InvoicedDetailRollup]
CREATE TABLE [dbo].[InvoicedDetailRollup]
(
[InvoicedDetailRollupID] [int] NOT NULL IDENTITY(1, 1),
[InvoicedDetailFID] [int] NOT NULL,
[BillingMinorItemFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedDetailRollup] ADD CONSTRAINT [PK_InvoicedDetailRollupID] PRIMARY KEY NONCLUSTERED ([InvoicedDetailRollupID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_InvoicedDetailRollup_InvoicedDetailFID] ON [dbo].[InvoicedDetailRollup] ([InvoicedDetailFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedDetailRollup] ADD CONSTRAINT [FK_InvoicedDetailRollup_InvoicedDetail] FOREIGN KEY ([InvoicedDetailFID]) REFERENCES [dbo].[InvoicedDetail] ([IDPriKey]) ON DELETE CASCADE ON UPDATE CASCADE
GO
GRANT SELECT ON [dbo].[InvoicedDetailRollup] TO [MssExec]
GRANT INSERT ON [dbo].[InvoicedDetailRollup] TO [MssExec]
GRANT DELETE ON [dbo].[InvoicedDetailRollup] TO [MssExec]
GRANT UPDATE ON [dbo].[InvoicedDetailRollup] TO [MssExec]
GO