Tables [dbo].[CommissionedDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)39571
Created12:32:29 PM Monday, August 4, 2014
Last Modified7:29:54 PM Tuesday, June 11, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Primary Key PK_CommissionedDetail: CDPriKeyIndexes IX_CommissionedDetail_DocumentNumber: CDPriKey\BMinPriKey\BminDistPriKey\DocumentNumberCDPriKeyint4
No
1 - 1
Cluster Key IX_CommissionedDetail_BMinPriKey: BMinPriKeyForeign Keys FK_CommissionedDetail_BillingMinorItem: [dbo].[BillingMinorItem].BMinPriKeyIndexes IX_CommissionedDetail_DocumentNumber: CDPriKey\BMinPriKey\BminDistPriKey\DocumentNumberBMinPriKeyint4
Yes
Foreign Keys FK_CommissionedDetail_BillingMinorDist: [dbo].[BillingMinorDist].BminDistPriKeyIndexes IX_CommissionedDetail_BminDistPriKey: BminDistPriKeyIndexes IX_CommissionedDetail_DocumentNumber: CDPriKey\BMinPriKey\BminDistPriKey\DocumentNumberBminDistPriKeyint4
Yes
Foreign Keys FK_CommissionedDetail_Sysuser: [dbo].[Sysuser].SysUserPriKeyIndexes IX_CommissionedDetail_SysUserPriKey: SysUserPriKeySysUserPriKeyint4
No
Amountmoney8
No
Indexes IX_CommissionedDetail_CommissionType: CommissionTypeCommissionTypevarchar(8)8
Yes
CommissionPercfloat8
Yes
CommissionFactormoney8
Yes
Foreign Keys FK_CommissionedDetail_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
Foreign Keys FK_CommissionedDetail_AccountingNote: [dbo].[AccountingNote].ANPriKeyIndexes IX_CommissionedDetail_ANPriKey: ANPriKeyANPriKeyint4
Yes
Foreign Keys FK_CommissionedDetail_Sysuser1: [dbo].[Sysuser].OverRideByIndexes IX_CommissionedDetail_OverRideBy: OverRideByOverRideByint4
Yes
OverRideOndatetime8
Yes
Descriptionvarchar(128)128
Yes
DocDatedatetime8
Yes
JournalDatedatetime8
Yes
PostedDatedatetime8
Yes
Foreign Keys FK_CommissionedDetail_Sysuser2: [dbo].[Sysuser].PostedByIndexes IX_CommissionedDetail_PostedBy: PostedByPostedByint4
Yes
CommissionAfterSplitmoney8
Yes
ApplyToDocint4
Yes
Refers to the original CommissionedDetail transaction
Foreign Keys FK_CommissionedDetail_CommissionBasis: [dbo].[CommissionBasis].CBPriKeyIndexes IX_CommissionedDetail_CBPriKey: CBPriKeyCBPriKeyint4
Yes
(FK) to CommissionBasis
1099Flagbit1
No
((0))
VendorIDvarchar(15)15
Yes
Foreign Keys FK_CommissionedDetail_LaborType: [dbo].[LaborType].LaborTypeFIDLaborTypeFIDint4
No
Indexes IX_CommissionedDetail_DocumentNumber: CDPriKey\BMinPriKey\BminDistPriKey\DocumentNumberDocumentNumbervarchar(21)21
Yes
Milesint4
Yes
Hoursfloat8
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_CommissionedDetail: CDPriKeyPK_CommissionedDetailCDPriKey
Yes
IX_CommissionedDetail_ANPriKeyANPriKey
IX_CommissionedDetail_BminDistPriKeyBminDistPriKey
Cluster Key IX_CommissionedDetail_BMinPriKey: BMinPriKeyIX_CommissionedDetail_BMinPriKeyBMinPriKey
IX_CommissionedDetail_CBPriKeyCBPriKey
IX_CommissionedDetail_CommissionTypeCommissionType
IX_CommissionedDetail_DocumentNumberCDPriKey, BMinPriKey, BminDistPriKey, DocumentNumber
IX_CommissionedDetail_OverRideByOverRideBy
IX_CommissionedDetail_PostedByPostedBy
IX_CommissionedDetail_SysUserPriKeySysUserPriKey
Foreign Keys Foreign Keys
NameColumns
FK_CommissionedDetail_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_CommissionedDetail_BillingMinorDistBminDistPriKey->[dbo].[BillingMinorDist].[BMinDistPriKey]
FK_CommissionedDetail_BillingMinorItemBMinPriKey->[dbo].[BillingMinorItem].[BMinPriKey]
FK_CommissionedDetail_CommissionBasisCBPriKey->[dbo].[CommissionBasis].[CBPriKey]
FK_CommissionedDetail_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_CommissionedDetail_LaborTypeLaborTypeFID->[dbo].[LaborType].[PriKey]
FK_CommissionedDetail_Sysuser1OverRideBy->[dbo].[Sysuser].[SysUserID]
FK_CommissionedDetail_Sysuser2PostedBy->[dbo].[Sysuser].[SysUserID]
FK_CommissionedDetail_SysuserSysUserPriKey->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[CommissionedDetail]
(
[CDPriKey] [int] NOT NULL IDENTITY(1, 1),
[BMinPriKey] [int] NULL,
[BminDistPriKey] [int] NULL,
[SysUserPriKey] [int] NOT NULL,
[Amount] [money] NOT NULL,
[CommissionType] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CommissionPerc] [float] NULL,
[CommissionFactor] [money] NULL,
[DivisionFID] [int] NULL,
[ANPriKey] [int] NULL,
[OverRideBy] [int] NULL,
[OverRideOn] [datetime] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBy] [int] NULL,
[CommissionAfterSplit] [money] NULL,
[ApplyToDoc] [int] NULL,
[CBPriKey] [int] NULL,
[1099Flag] [bit] NOT NULL CONSTRAINT [DF_CommissionedDetail_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,
[Miles] [int] NULL,
[Hours] [float] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [PK_CommissionedDetail] PRIMARY KEY NONCLUSTERED  ([CDPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_ANPriKey] ON [dbo].[CommissionedDetail] ([ANPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_BminDistPriKey] ON [dbo].[CommissionedDetail] ([BminDistPriKey]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_CommissionedDetail_BMinPriKey] ON [dbo].[CommissionedDetail] ([BMinPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_CBPriKey] ON [dbo].[CommissionedDetail] ([CBPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_CommissionType] ON [dbo].[CommissionedDetail] ([CommissionType]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_DocumentNumber] ON [dbo].[CommissionedDetail] ([DocumentNumber]) INCLUDE ([BminDistPriKey], [BMinPriKey], [CDPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_OverRideBy] ON [dbo].[CommissionedDetail] ([OverRideBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_PostedBy] ON [dbo].[CommissionedDetail] ([PostedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_CommissionedDetail_SysUserPriKey] ON [dbo].[CommissionedDetail] ([SysUserPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_BillingMinorDist] FOREIGN KEY ([BminDistPriKey]) REFERENCES [dbo].[BillingMinorDist] ([BMinDistPriKey])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_BillingMinorItem] FOREIGN KEY ([BMinPriKey]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_CommissionBasis] FOREIGN KEY ([CBPriKey]) REFERENCES [dbo].[CommissionBasis] ([CBPriKey])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_LaborType] FOREIGN KEY ([LaborTypeFID]) REFERENCES [dbo].[LaborType] ([PriKey])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_Sysuser1] FOREIGN KEY ([OverRideBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_Sysuser2] FOREIGN KEY ([PostedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[CommissionedDetail] ADD CONSTRAINT [FK_CommissionedDetail_Sysuser] FOREIGN KEY ([SysUserPriKey]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[CommissionedDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[CommissionedDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[CommissionedDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[CommissionedDetail] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Refers to the original CommissionedDetail transaction', 'SCHEMA', N'dbo', 'TABLE', N'CommissionedDetail', 'COLUMN', N'ApplyToDoc'
GO
EXEC sp_addextendedproperty N'MS_Description', N'(FK) to CommissionBasis', 'SCHEMA', N'dbo', 'TABLE', N'CommissionedDetail', 'COLUMN', N'CBPriKey'
GO
Uses
Used By