Tables [dbo].[ThirdParty]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)2944
Created4:57:09 PM Thursday, September 7, 2006
Last Modified3:37:55 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_ThirdParty: TPPriKeyTPPriKeyint4
No
1 - 1
Cluster Key IX_ThirdParty_BMinPriKey: BMinPriKeyForeign Keys FK_ThirdParty_BillingMinorItem: [dbo].[BillingMinorItem].BMinPriKeyBMinPriKeyint4
Yes
Foreign Keys FK_ThirdParty_BillingMinorDist: [dbo].[BillingMinorDist].BMinDistPriKeyIndexes IX_ThirdParty_BMinDistPriKey: BMinDistPriKeyBMinDistPriKeyint4
Yes
Indexes IX_ThirdParty_VendorID_InvoiceNumber: VendorID\InvoiceNumberVendorIDchar(15)15
No
PayableAmountmoney8
Yes
Indexes IX_ThirdParty_VendorID_InvoiceNumber: VendorID\InvoiceNumberInvoiceNumbervarchar(30)30
Yes
PONumbervarchar(30)30
Yes
Foreign Keys FK_ThirdParty_AccountingNote: [dbo].[AccountingNote].ANPriKeyIndexes IX_ThirdParty_ANPriKey: ANPriKeyANPriKeyint4
Yes
Descriptionvarchar(128)128
Yes
DocDatedatetime8
Yes
JournalDatedatetime8
Yes
PostedDatedatetime8
Yes
Foreign Keys FK_ThirdParty_Sysuser: [dbo].[Sysuser].PostedByIndexes IX_ThirdParty_PostedBy: PostedByPostedByint4
Yes
ApplyToDocint4
Yes
InvoiceDatedatetime8
Yes
1099Flagbit1
No
((0))
OnHoldFlagbit1
No
((0))
Indexes IX_ThirdParty_DocumentNumber: DocumentNumberDocumentNumbervarchar(21)21
Yes
OriginalInvoiceNumbervarchar(30)30
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_ThirdParty: TPPriKeyPK_ThirdPartyTPPriKey
Yes
80
IX_ThirdParty_ANPriKeyANPriKey
IX_ThirdParty_BMinDistPriKeyBMinDistPriKey80
Cluster Key IX_ThirdParty_BMinPriKey: BMinPriKeyIX_ThirdParty_BMinPriKeyBMinPriKey80
IX_ThirdParty_DocumentNumberDocumentNumber
IX_ThirdParty_PostedByPostedBy
IX_ThirdParty_VendorID_InvoiceNumberVendorID, InvoiceNumber
Foreign Keys Foreign Keys
NameColumns
FK_ThirdParty_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_ThirdParty_BillingMinorDistBMinDistPriKey->[dbo].[BillingMinorDist].[BMinDistPriKey]
FK_ThirdParty_BillingMinorItemBMinPriKey->[dbo].[BillingMinorItem].[BMinPriKey]
FK_ThirdParty_SysuserPostedBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ThirdParty]
(
[TPPriKey] [int] NOT NULL IDENTITY(1, 1),
[BMinPriKey] [int] NULL,
[BMinDistPriKey] [int] NULL,
[VendorID] [char] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PayableAmount] [money] NULL,
[InvoiceNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PONumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ANPriKey] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBy] [int] NULL,
[ApplyToDoc] [int] NULL,
[InvoiceDate] [datetime] NULL,
[1099Flag] [bit] NOT NULL CONSTRAINT [DF_ThirdParty_1099Flag] DEFAULT ((0)),
[OnHoldFlag] [bit] NOT NULL CONSTRAINT [DF_ThirdParty_OnHoldFlag] DEFAULT ((0)),
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OriginalInvoiceNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ThirdParty] ADD CONSTRAINT [PK_ThirdParty] PRIMARY KEY NONCLUSTERED  ([TPPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ThirdParty_ANPriKey] ON [dbo].[ThirdParty] ([ANPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ThirdParty_BMinDistPriKey] ON [dbo].[ThirdParty] ([BMinDistPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_ThirdParty_BMinPriKey] ON [dbo].[ThirdParty] ([BMinPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ThirdParty_DocumentNumber] ON [dbo].[ThirdParty] ([DocumentNumber]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ThirdParty_PostedBy] ON [dbo].[ThirdParty] ([PostedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ThirdParty_VendorID_InvoiceNumber] ON [dbo].[ThirdParty] ([VendorID], [InvoiceNumber]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ThirdParty] ADD CONSTRAINT [FK_ThirdParty_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[ThirdParty] ADD CONSTRAINT [FK_ThirdParty_BillingMinorDist] FOREIGN KEY ([BMinDistPriKey]) REFERENCES [dbo].[BillingMinorDist] ([BMinDistPriKey])
GO
ALTER TABLE [dbo].[ThirdParty] ADD CONSTRAINT [FK_ThirdParty_BillingMinorItem] FOREIGN KEY ([BMinPriKey]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[ThirdParty] ADD CONSTRAINT [FK_ThirdParty_Sysuser] FOREIGN KEY ([PostedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[ThirdParty] TO [MssExec]
GRANT INSERT ON  [dbo].[ThirdParty] TO [MssExec]
GRANT DELETE ON  [dbo].[ThirdParty] TO [MssExec]
GRANT UPDATE ON  [dbo].[ThirdParty] TO [MssExec]
GO
Uses
Used By