Tables [dbo].[BillingMajorReduction]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)3704
Created10:12:50 PM Thursday, December 28, 2006
Last Modified9:09:16 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_BillingMajorReduction: BillingMajorReductionIDBillingMajorReductionIDint4
No
1 - 1
Foreign Keys FK_BillingMajorReduction_BillingMajorItem: [dbo].[BillingMajorItem].BillingMajorItemFIDIndexes IX_BillingMajorReduction_BillingMajorItemFID: BillingMajorItemFIDBillingMajorItemFIDint4
No
Foreign Keys FK_BillingMajorReduction_ReductionType: [dbo].[ReductionType].ReductionTypeFIDReductionTypeFIDint4
No
Foreign Keys FK_BillingMajorReduction_ReductionBasis: [dbo].[ReductionBasis].ReductionBasisFIDReductionBasisFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_BillingMinorItemAddBack: [dbo].[BillingMinorItem].BillingMinorItemAddBackFIDIndexes IX_BillingMajorReduction_BillingMinorItemAddBack: BillingMinorItemAddBackFIDBillingMinorItemAddBackFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
Descriptionvarchar(128)128
Yes
Percentagedecimal(10,3)9
Yes
ReductionAmountmoney8
No
((0))
Foreign Keys FK_BillingMajorReduction_ReductionTemplateHeader: [dbo].[ReductionTemplateHeader].ReductionTemplateFIDReductionTemplateFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_BranchFID: [dbo].[Branch].BranchFIDBranchFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_ARBranchFID: [dbo].[Branch].ARBranchFIDARBranchFIDint4
Yes
Foreign Keys FK_BillingMajorReduction_ARDivision: [dbo].[Division].ARDivisionFIDARDivisionFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_BillingMajorReduction: BillingMajorReductionIDPK_BillingMajorReductionBillingMajorReductionID
Yes
80
IX_BillingMajorReduction_BillingMajorItemFIDBillingMajorItemFID
IX_BillingMajorReduction_BillingMinorItemAddBackBillingMinorItemAddBackFID
Foreign Keys Foreign Keys
NameColumns
FK_BillingMajorReduction_ARBranchFIDARBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMajorReduction_ARDivisionARDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMajorReduction_BillingMajorItemBillingMajorItemFID->[dbo].[BillingMajorItem].[BMajPriKey]
FK_BillingMajorReduction_BillingMinorItemAddBackBillingMinorItemAddBackFID->[dbo].[BillingMinorItem].[BMinPriKey]
FK_BillingMajorReduction_BranchFIDBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMajorReduction_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMajorReduction_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_BillingMajorReduction_ReductionBasisReductionBasisFID->[dbo].[ReductionBasis].[ReductionBasisID]
FK_BillingMajorReduction_ReductionTemplateHeaderReductionTemplateFID->[dbo].[ReductionTemplateHeader].[ReductionTemplateID]
FK_BillingMajorReduction_ReductionTypeReductionTypeFID->[dbo].[ReductionType].[ReductionTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BillingMajorReduction]
(
[BillingMajorReductionID] [int] NOT NULL IDENTITY(1, 1),
[BillingMajorItemFID] [int] NOT NULL,
[ReductionTypeFID] [int] NOT NULL,
[ReductionBasisFID] [int] NULL,
[BillingMinorItemAddBackFID] [int] NULL,
[ItemCodeFID] [int] NULL,
[DivisionFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Percentage] [decimal] (10, 3) NULL,
[ReductionAmount] [money] NOT NULL CONSTRAINT [DF_BillingMajorReduction_ReductionAmount] DEFAULT ((0)),
[ReductionTemplateFID] [int] NULL,
[BranchFID] [int] NULL,
[ARBranchFID] [int] NULL,
[ARDivisionFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [PK_BillingMajorReduction] PRIMARY KEY NONCLUSTERED  ([BillingMajorReductionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorReduction_BillingMajorItemFID] ON [dbo].[BillingMajorReduction] ([BillingMajorItemFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMajorReduction_BillingMinorItemAddBack] ON [dbo].[BillingMajorReduction] ([BillingMinorItemAddBackFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ARBranchFID] FOREIGN KEY ([ARBranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ARDivision] FOREIGN KEY ([ARDivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_BillingMajorItem] FOREIGN KEY ([BillingMajorItemFID]) REFERENCES [dbo].[BillingMajorItem] ([BMajPriKey])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_BillingMinorItemAddBack] FOREIGN KEY ([BillingMinorItemAddBackFID]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_BranchFID] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ReductionBasis] FOREIGN KEY ([ReductionBasisFID]) REFERENCES [dbo].[ReductionBasis] ([ReductionBasisID])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ReductionTemplateHeader] FOREIGN KEY ([ReductionTemplateFID]) REFERENCES [dbo].[ReductionTemplateHeader] ([ReductionTemplateID])
GO
ALTER TABLE [dbo].[BillingMajorReduction] ADD CONSTRAINT [FK_BillingMajorReduction_ReductionType] FOREIGN KEY ([ReductionTypeFID]) REFERENCES [dbo].[ReductionType] ([ReductionTypeID])
GO
GRANT SELECT ON  [dbo].[BillingMajorReduction] TO [MssExec]
GRANT INSERT ON  [dbo].[BillingMajorReduction] TO [MssExec]
GRANT DELETE ON  [dbo].[BillingMajorReduction] TO [MssExec]
GRANT UPDATE ON  [dbo].[BillingMajorReduction] TO [MssExec]
GO
Uses
Used By