Tables [dbo].[StatementDetailDist]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)60349
Created4:57:09 PM Thursday, September 7, 2006
Last Modified10:27:19 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_StatementDetailDist: SDDPriKeySDDPriKeyint4
No
1 - 1
Foreign Keys FK_StatementDetailDist_StatementDetail: [dbo].[StatementDetail].SDPriKeyIndexes IX_StatementDetailDist_SDPriKey: SDPriKeyIndexes IX_StatementDetailDist_SDPriKey_OrdPriKey: SDPriKey\OrdPriKeySDPriKeyint4
Yes
Foreign Keys FK_StatementDetailDist_AccountingNote: [dbo].[AccountingNote].ANPriKeyIndexes IX_StatementDetailDist_ANPriKey: ANPriKeyANPriKeyint4
Yes
OrderControlvarchar(30)30
Yes
Descriptionvarchar(128)128
Yes
Amountmoney8
Yes
(0)
Splitvarchar(1)1
Yes
Foreign Keys FK_StatementDetailDist_Branch: [dbo].[Branch].BranchPriKeyIndexes IX_StatementDetailDist_BranchPriKey: BranchPriKeyBranchPriKeyint4
No
Foreign Keys FK_StatementDetailDist_Orders: [dbo].[Orders].OrdPriKeyIndexes IX_StatementDetailDist_OrdPriKey: OrdPriKeyIndexes IX_StatementDetailDist_SDPriKey_OrdPriKey: SDPriKey\OrdPriKeyOrdPriKeyint4
Yes
UnappliedCashsmallint2
Yes
(0)
UnappliedAmountmoney8
Yes
(0)
Foreign Keys FK_StatementDetailDist_PaymentCode: [dbo].[PaymentCode].PaymentCodePriKeyIndexes IX_StatementDetailDist_PaymentCodePriKey: PaymentCodePriKeyPaymentCodePriKeyint4
Yes
Balancemoney8
Yes
(0)
ApplyAmountmoney8
Yes
(0)
AmountRemainingmoney8
Yes
(0)
Adjustmentsmallint2
Yes
(0)
ApplyCheckint4
Yes
(0)
Indexes IX_StatementDetailDist_ContestCharge: ContestChargeContestChargesmallint2
Yes
(0)
CustomerNumbervarchar(15)15
Yes
Foreign Keys FK_StatementDetailDist_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
Foreign Keys FK_StatementDetailDist_Claim: [dbo].[Claim].ClaimFIDClaimFIDint4
Yes
Foreign Keys FK_StatementDetailDist_UnappliedBranch: [dbo].[Branch].UnappliedBranchFIDUnappliedBranchFIDint4
Yes
Foreign Keys FK_StatementDetailDist_UnappliedDivision: [dbo].[Division].UnappliedDivisionFIDUnappliedDivisionFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_StatementDetailDist: SDDPriKeyPK_StatementDetailDistSDDPriKey
Yes
80
IX_StatementDetailDist_ANPriKeyANPriKey
IX_StatementDetailDist_BranchPriKeyBranchPriKey
IX_StatementDetailDist_ContestChargeContestCharge80
IX_StatementDetailDist_OrdPriKeyOrdPriKey80
IX_StatementDetailDist_PaymentCodePriKeyPaymentCodePriKey80
IX_StatementDetailDist_SDPriKeySDPriKey80
IX_StatementDetailDist_SDPriKey_OrdPriKeySDPriKey, OrdPriKey
Foreign Keys Foreign Keys
NameColumns
FK_StatementDetailDist_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_StatementDetailDist_BranchBranchPriKey->[dbo].[Branch].[BranchPriKey]
FK_StatementDetailDist_ClaimClaimFID->[dbo].[Claim].[ClaimID]
FK_StatementDetailDist_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_StatementDetailDist_OrdersOrdPriKey->[dbo].[Orders].[PriKey]
FK_StatementDetailDist_PaymentCodePaymentCodePriKey->[dbo].[PaymentCode].[PaymentCodePriKey]
FK_StatementDetailDist_StatementDetailSDPriKey->[dbo].[StatementDetail].[SDPriKey]
FK_StatementDetailDist_UnappliedBranchUnappliedBranchFID->[dbo].[Branch].[BranchPriKey]
FK_StatementDetailDist_UnappliedDivisionUnappliedDivisionFID->[dbo].[Division].[DivisionID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StatementDetailDist]
(
[SDDPriKey] [int] NOT NULL IDENTITY(1, 1),
[SDPriKey] [int] NULL,
[ANPriKey] [int] NULL,
[OrderControl] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NULL CONSTRAINT [DF_StatementDetailDist_Amount] DEFAULT (0),
[Split] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BranchPriKey] [int] NOT NULL,
[OrdPriKey] [int] NULL,
[UnappliedCash] [smallint] NULL CONSTRAINT [DF_StatementDetailDist_UnappliedCash] DEFAULT (0),
[UnappliedAmount] [money] NULL CONSTRAINT [DF_StatementDetailDist_UnappliedAmount] DEFAULT (0),
[PaymentCodePriKey] [int] NULL,
[Balance] [money] NULL CONSTRAINT [DF_StatementDetailDist_Balance] DEFAULT (0),
[ApplyAmount] [money] NULL CONSTRAINT [DF_StatementDetailDist_ApplyAmount] DEFAULT (0),
[AmountRemaining] [money] NULL CONSTRAINT [DF_StatementDetailDist_AmountRemaining] DEFAULT (0),
[Adjustment] [smallint] NULL CONSTRAINT [DF_StatementDetailDist_Adjustment] DEFAULT (0),
[ApplyCheck] [int] NULL CONSTRAINT [DF_StatementDetailDist_ApplyCheck] DEFAULT (0),
[ContestCharge] [smallint] NULL CONSTRAINT [DF_StatementDetailDist_ContestCharge] DEFAULT (0),
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DivisionFID] [int] NULL,
[ClaimFID] [int] NULL,
[UnappliedBranchFID] [int] NULL,
[UnappliedDivisionFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [PK_StatementDetailDist] PRIMARY KEY CLUSTERED  ([SDDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_ANPriKey] ON [dbo].[StatementDetailDist] ([ANPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_BranchPriKey] ON [dbo].[StatementDetailDist] ([BranchPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_ContestCharge] ON [dbo].[StatementDetailDist] ([ContestCharge]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_OrdPriKey] ON [dbo].[StatementDetailDist] ([OrdPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_PaymentCodePriKey] ON [dbo].[StatementDetailDist] ([PaymentCodePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_SDPriKey] ON [dbo].[StatementDetailDist] ([SDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StatementDetailDist_SDPriKey_OrdPriKey] ON [dbo].[StatementDetailDist] ([SDPriKey], [OrdPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_Branch] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_Claim] FOREIGN KEY ([ClaimFID]) REFERENCES [dbo].[Claim] ([ClaimID])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_Orders] FOREIGN KEY ([OrdPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_PaymentCode] FOREIGN KEY ([PaymentCodePriKey]) REFERENCES [dbo].[PaymentCode] ([PaymentCodePriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_StatementDetail] FOREIGN KEY ([SDPriKey]) REFERENCES [dbo].[StatementDetail] ([SDPriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_UnappliedBranch] FOREIGN KEY ([UnappliedBranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[StatementDetailDist] ADD CONSTRAINT [FK_StatementDetailDist_UnappliedDivision] FOREIGN KEY ([UnappliedDivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
GRANT SELECT ON  [dbo].[StatementDetailDist] TO [MssExec]
GRANT INSERT ON  [dbo].[StatementDetailDist] TO [MssExec]
GRANT DELETE ON  [dbo].[StatementDetailDist] TO [MssExec]
GRANT UPDATE ON  [dbo].[StatementDetailDist] TO [MssExec]
GO
Uses
Used By