[dbo].[InvoicedGroupRollup]
CREATE TABLE [dbo].[InvoicedGroupRollup]
(
[InvoicedGroupRollupID] [int] NOT NULL IDENTITY(1, 1),
[InvoicedGroupFID] [int] NOT NULL,
[BillingMinorItemFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedGroupRollup] ADD CONSTRAINT [PK_InvoicedGroupRollupID] PRIMARY KEY NONCLUSTERED ([InvoicedGroupRollupID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_InvoicedGroupRollup_InvoicedGroupFID] ON [dbo].[InvoicedGroupRollup] ([InvoicedGroupFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedGroupRollup] ADD CONSTRAINT [FK_InvoicedGroupRollup_InvoicedGroup] FOREIGN KEY ([InvoicedGroupFID]) REFERENCES [dbo].[InvoicedGroup] ([IGPriKey]) ON DELETE CASCADE ON UPDATE CASCADE
GO
GRANT SELECT ON [dbo].[InvoicedGroupRollup] TO [MssExec]
GRANT INSERT ON [dbo].[InvoicedGroupRollup] TO [MssExec]
GRANT DELETE ON [dbo].[InvoicedGroupRollup] TO [MssExec]
GRANT UPDATE ON [dbo].[InvoicedGroupRollup] TO [MssExec]
GO