[dbo].[VanlineStatementDetailDist]
CREATE TABLE [dbo].[VanlineStatementDetailDist]
(
[VanlineStatementDetailDistID] [int] NOT NULL IDENTITY(1, 1),
[VanlineStatementDetailFID] [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].[VanlineStatementDetailDist] ADD CONSTRAINT [PK_VanlineStatementDetailDist] PRIMARY KEY CLUSTERED ([VanlineStatementDetailDistID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_VanlineStatementDetailDist_Detail] ON [dbo].[VanlineStatementDetailDist] ([VanlineStatementDetailFID], [ServiceCodeExternal]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementDetailDist] ADD CONSTRAINT [FK_VanlineStatementDetailDist_VanlineStatementDetail] FOREIGN KEY ([VanlineStatementDetailFID]) REFERENCES [dbo].[VanlineStatementDetail] ([VanlineStatementDetailID])
GO
GRANT SELECT ON [dbo].[VanlineStatementDetailDist] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineStatementDetailDist] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineStatementDetailDist] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineStatementDetailDist] TO [MssExec]
GO