[dbo].[VanlineStatementStageDetail]
CREATE TABLE [dbo].[VanlineStatementStageDetail]
(
[VanlineStatementStageDetailID] [int] NOT NULL IDENTITY(1, 1),
[VanlineStatementStageHeaderFID] [int] NOT NULL,
[OrderControl] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BrandCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ShipperLastName] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ShipperFirstName] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LoadDate] [datetime] NULL,
[DeliveryDate] [datetime] NULL,
[Weight] [int] NULL,
[Miles] [int] NULL,
[DriverNo] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VendorNo] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TransactionType] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PaymentCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MergeablePayment] [bit] NULL,
[CanSeparateDistributions] [bit] NULL,
[SortBy] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementStageDetail] ADD CONSTRAINT [PK_VanlineStatementStageDetail] PRIMARY KEY CLUSTERED ([VanlineStatementStageDetailID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_[VanlineStatementStageDetail_Header] ON [dbo].[VanlineStatementStageDetail] ([VanlineStatementStageHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[VanlineStatementStageDetail] ADD CONSTRAINT [FK_VanlineStatementStageDetail_VanlineStatementStageHeader] FOREIGN KEY ([VanlineStatementStageHeaderFID]) REFERENCES [dbo].[VanlineStatementStageHeader] ([VanlineStatementStageHeaderID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[VanlineStatementStageDetail] TO [MssExec]
GRANT INSERT ON [dbo].[VanlineStatementStageDetail] TO [MssExec]
GRANT DELETE ON [dbo].[VanlineStatementStageDetail] TO [MssExec]
GRANT UPDATE ON [dbo].[VanlineStatementStageDetail] TO [MssExec]
GO