[dbo].[ThirdPartyCalculation]
CREATE TABLE [dbo].[ThirdPartyCalculation]
(
[ThirdPartyCalculationID] [int] NOT NULL IDENTITY(1, 1),
[ThirdPartyFID] [int] NOT NULL,
[Description] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ThirdPartyCalculation] ADD CONSTRAINT [PK_ThirdPartyCalculation] PRIMARY KEY NONCLUSTERED ([ThirdPartyCalculationID]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_ThirdPartyCalculation_ThirdPartyID] ON [dbo].[ThirdPartyCalculation] ([ThirdPartyFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ThirdPartyCalculation] ADD CONSTRAINT [FK_ThirdPartyCalculation_ThirdParty] FOREIGN KEY ([ThirdPartyFID]) REFERENCES [dbo].[ThirdParty] ([TPPriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[ThirdPartyCalculation] TO [MssExec]
GRANT INSERT ON [dbo].[ThirdPartyCalculation] TO [MssExec]
GRANT DELETE ON [dbo].[ThirdPartyCalculation] TO [MssExec]
GRANT UPDATE ON [dbo].[ThirdPartyCalculation] TO [MssExec]
GO