Tables [dbo].[SplitCommissions]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)469
Created12:32:29 PM Monday, August 4, 2014
Last Modified7:31:33 PM Tuesday, September 24, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_SplitCommissions: SCPriKeySCPriKeyint4
No
1 - 1
Cluster Key IX_SplitCommissions_CDPriKey: CDPriKeyForeign Keys FK_SplitCommissions_CommissionedDetail: [dbo].[CommissionedDetail].CDPriKeyCDPriKeyint4
No
Foreign Keys FK_SplitCommissions_Sysuser: [dbo].[Sysuser].SysUserPriKeyIndexes IX_SplitCommissions_SysUserPriKey: SysUserPriKeySysUserPriKeyint4
No
Amountmoney8
No
CommissionTypevarchar(1)1
Yes
CommissionPercfloat8
Yes
FlatRatemoney8
Yes
HaulingWeightint4
Yes
Foreign Keys FK_SplitCommissions_AccountingNote: [dbo].[AccountingNote].ANPriKeyANPriKeyint4
Yes
Descriptionvarchar(128)128
Yes
Milesint4
Yes
ApplyToDocint4
Yes
DocDatedatetime8
Yes
JournalDatedatetime8
Yes
PostedDatedatetime8
Yes
Foreign Keys FK_SplitCommissions_Sysuser1: [dbo].[Sysuser].PostedByIndexes IX_SplitCommissions_PostedBy: PostedByPostedByint4
Yes
DivisionFIDint4
Yes
1099Flagbit1
No
((0))
VendorIDvarchar(15)15
Yes
Foreign Keys FK_SplitCommissions_LaborType: [dbo].[LaborType].LaborTypeFIDLaborTypeFIDint4
No
DocumentNumbervarchar(21)21
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_SplitCommissions: SCPriKeyPK_SplitCommissionsSCPriKey
Yes
Cluster Key IX_SplitCommissions_CDPriKey: CDPriKeyIX_SplitCommissions_CDPriKeyCDPriKey
IX_SplitCommissions_PostedByPostedBy
IX_SplitCommissions_SysUserPriKeySysUserPriKey
Foreign Keys Foreign Keys
NameColumns
FK_SplitCommissions_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_SplitCommissions_CommissionedDetailCDPriKey->[dbo].[CommissionedDetail].[CDPriKey]
FK_SplitCommissions_LaborTypeLaborTypeFID->[dbo].[LaborType].[PriKey]
FK_SplitCommissions_Sysuser1PostedBy->[dbo].[Sysuser].[SysUserID]
FK_SplitCommissions_SysuserSysUserPriKey->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SplitCommissions]
(
[SCPriKey] [int] NOT NULL IDENTITY(1, 1),
[CDPriKey] [int] NOT NULL,
[SysUserPriKey] [int] NOT NULL,
[Amount] [money] NOT NULL,
[CommissionType] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CommissionPerc] [float] NULL,
[FlatRate] [money] NULL,
[HaulingWeight] [int] NULL,
[ANPriKey] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Miles] [int] NULL,
[ApplyToDoc] [int] NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBy] [int] NULL,
[DivisionFID] [int] NULL,
[1099Flag] [bit] NOT NULL CONSTRAINT [DF_SplitCommissions_1099Flag] DEFAULT ((0)),
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LaborTypeFID] [int] NOT NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [PK_SplitCommissions] PRIMARY KEY NONCLUSTERED  ([SCPriKey]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_SplitCommissions_CDPriKey] ON [dbo].[SplitCommissions] ([CDPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SplitCommissions_PostedBy] ON [dbo].[SplitCommissions] ([PostedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SplitCommissions_SysUserPriKey] ON [dbo].[SplitCommissions] ([SysUserPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [FK_SplitCommissions_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [FK_SplitCommissions_CommissionedDetail] FOREIGN KEY ([CDPriKey]) REFERENCES [dbo].[CommissionedDetail] ([CDPriKey])
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [FK_SplitCommissions_LaborType] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [FK_SplitCommissions_Sysuser1] FOREIGN KEY ([PostedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[SplitCommissions] ADD CONSTRAINT [FK_SplitCommissions_Sysuser] FOREIGN KEY ([SysUserPriKey]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[SplitCommissions] TO [MssExec]
GRANT INSERT ON  [dbo].[SplitCommissions] TO [MssExec]
GRANT DELETE ON  [dbo].[SplitCommissions] TO [MssExec]
GRANT UPDATE ON  [dbo].[SplitCommissions] TO [MssExec]
GO
Uses
Used By