[dbo].[VanlineStatementStageDetailDist]
CREATE TABLE [dbo].[VanlineStatementStageDetailDist]
(
[VanlineStatementStageDetailDistID] [int] NOT NULL IDENTITY(1, 1),
[VanlineStatementStageDetailFID] [int] NOT NULL,
[ServiceCodeExternal] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceDescription] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ServiceCode] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementStageDetailDist] ADD CONSTRAINT [PK_VanlineStatementStageDetailDist] PRIMARY KEY CLUSTERED ([VanlineStatementStageDetailDistID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementStageDetailDist_VanlineStatementStageDetail] ON [dbo].[VanlineStatementStageDetailDist] ([VanlineStatementStageDetailFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementStageDetailDist] ADD CONSTRAINT [FK_VanlineStatementStageDetailDist_VanlineStatementStageDetail] FOREIGN KEY ([VanlineStatementStageDetailFID]) REFERENCES [dbo].[VanlineStatementStageDetail] ([VanlineStatementStageDetailID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[VanlineStatementStageDetailDist] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineStatementStageDetailDist] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineStatementStageDetailDist] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineStatementStageDetailDist] TO [MssExec]
GO