Tables [dbo].[RevenueRatingImportedSplitHaul]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)32
Created5:01:53 PM Tuesday, November 4, 2008
Last Modified11:13:41 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_RevenueRatingImportedSplitHaul: RevenueRatingImportedSplitHaulIDRevenueRatingImportedSplitHaulIDint4
No
1 - 1
Foreign Keys FK_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeader: [dbo].[RevenueRatingImportedHeader].RevenueRatingImportedHeaderFIDIndexes IX_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeaderFID: RevenueRatingImportedHeaderFIDRevenueRatingImportedHeaderFIDint4
No
Foreign Keys FK_RevenueRatingImportedSplitHaul_Order: [dbo].[Orders].OrdersFIDOrdersFIDint4
Yes
AgentIDvarchar(10)10
No
DriverNumbervarchar(15)15
No
Milesint4
Yes
Weightint4
Yes
Percentagedecimal(12,4)9
Yes
PSegvarchar(1)1
Yes
OSegvarchar(1)1
Yes
SSegvarchar(1)1
Yes
ImportDateTimedatetime8
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_RevenueRatingImportedSplitHaul: RevenueRatingImportedSplitHaulIDPK_RevenueRatingImportedSplitHaulRevenueRatingImportedSplitHaulID
Yes
80
IX_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeaderFIDRevenueRatingImportedHeaderFID80
Foreign Keys Foreign Keys
NameColumns
FK_RevenueRatingImportedSplitHaul_OrderOrdersFID->[dbo].[Orders].[PriKey]
FK_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeaderRevenueRatingImportedHeaderFID->[dbo].[RevenueRatingImportedHeader].[RevenueRatingImportedHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RevenueRatingImportedSplitHaul]
(
[RevenueRatingImportedSplitHaulID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportedHeaderFID] [int] NOT NULL,
[OrdersFID] [int] 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,
[ImportDateTime] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedSplitHaul] ADD CONSTRAINT [PK_RevenueRatingImportedSplitHaul] PRIMARY KEY CLUSTERED  ([RevenueRatingImportedSplitHaulID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeaderFID] ON [dbo].[RevenueRatingImportedSplitHaul] ([RevenueRatingImportedHeaderFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportedSplitHaul] ADD CONSTRAINT [FK_RevenueRatingImportedSplitHaul_Order] FOREIGN KEY ([OrdersFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[RevenueRatingImportedSplitHaul] ADD CONSTRAINT [FK_RevenueRatingImportedSplitHaul_RevenueRatingImportedHeader] FOREIGN KEY ([RevenueRatingImportedHeaderFID]) REFERENCES [dbo].[RevenueRatingImportedHeader] ([RevenueRatingImportedHeaderID])
GO
GRANT SELECT ON  [dbo].[RevenueRatingImportedSplitHaul] TO [MssExec]
GRANT INSERT ON  [dbo].[RevenueRatingImportedSplitHaul] TO [MssExec]
GRANT DELETE ON  [dbo].[RevenueRatingImportedSplitHaul] TO [MssExec]
GRANT UPDATE ON  [dbo].[RevenueRatingImportedSplitHaul] TO [MssExec]
GO
Uses