[dbo].[RevenueRatingImportSplitHaul]
CREATE TABLE [dbo].[RevenueRatingImportSplitHaul]
(
[RevenueRatingImportSplitHaulID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportHeaderFID] [int] NOT NULL,
[AgentID] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DriverNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Miles] [int] NULL,
[Weight] [int] NULL,
[Percentage] [decimal] (12, 4) NULL,
[PSeg] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OSeg] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SSeg] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportSplitHaul] ADD CONSTRAINT [PK_RevenueRatingImportSplitHaul] PRIMARY KEY CLUSTERED ([RevenueRatingImportSplitHaulID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportSplitHaul_RevenueRatingImportHeaderFID] ON [dbo].[RevenueRatingImportSplitHaul] ([RevenueRatingImportHeaderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportSplitHaul] ADD CONSTRAINT [FK_RevenueRatingImportSplitHaul_RevenueRatingImportHeader] FOREIGN KEY ([RevenueRatingImportHeaderFID]) REFERENCES [dbo].[RevenueRatingImportHeader] ([RevenueRatingImportHeaderID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[RevenueRatingImportSplitHaul] TO [MssExec]
GRANT INSERT ON [dbo].[RevenueRatingImportSplitHaul] TO [MssExec]
GRANT DELETE ON [dbo].[RevenueRatingImportSplitHaul] TO [MssExec]
GRANT UPDATE ON [dbo].[RevenueRatingImportSplitHaul] TO [MssExec]
GO