Tables [dbo].[SCQBillingMeterGroups]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:59:55 AM Thursday, March 21, 2019
Last Modified1:15:18 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK__SCQBilli__75F2D088B3220964: BillingMeterGroupIDBillingMeterGroupIDint4
False
1 - 1
Foreign Keys FK_SCQBillingMeterGroups_BillingID_SCQBillingContracts: [dbo].[SCQBillingContracts].BillingID\ContractDetailIDBillingIDint4
False
Foreign Keys FK_SCQBillingMeterGroups_BillingID_SCQBillingContracts: [dbo].[SCQBillingContracts].BillingID\ContractDetailIDContractDetailIDint4
False
OverageTypeIDint4
False
ContractMeterGroupIDint4
False
ContractMeterGroupvarchar(64)64
True
ContractMeterGroupDescriptionvarchar(128)128
True
CoveredCopiesdecimal(18,6)9
True
OvgChargeTypechar(1)1
True
GroupCopiesdecimal(18,6)9
True
CountedCopiesdecimal(18,6)9
True
BillableCopiesdecimal(18,6)9
True
TotalChargeAmountmoney8
True
EffectiveRatedecimal(16,6)9
True
MeterCountint4
False
CreatorIDchar(8)8
True
UpdatorIDchar(8)8
True
CreateDatedatetime8
True
(getdate())
LastUpdatedatetime8
True
(getdate())
timestamptimestamp8
True
NextOvgMethodint4
True
NextOvgRateIncreaseValuedecimal(16,6)9
True
NextOvgRoundNoDigitsint4
True
Foreign Keys FK_SCQBillingMeterGroups_OverageMethodID_SCOverageMethods: [dbo].[SCOverageMethods].OverageMethodIDOverageMethodIDint4
False
((1))
DistTaxAmountmoney8
False
((0))
NextCoveredCopiesdecimal(18,6)9
True
AvgGroupRatedecimal(18,6)9
False
((0))
BaseAmountmoney8
True
OverageAmountmoney8
True
BaseRatePerCopydecimal(18,6)9
False
((0))
RoundBaseAmountDigitsint4
False
((2))
BilledCoveredCopiesdecimal(18,6)9
True
Foreign Keys FK_SCQBillingMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodes: [dbo].[SCContractBaseDistCodes].BaseDistributionCodeIDBaseDistributionCodeIDint4
True
NextBaseMethodint4
True
NextBaseRateIncreaseValuedecimal(16,6)9
True
NextBaseRoundNoDigitsint4
True
NextCoveredCopiesDatedatetime8
True
CoveredCopiesPerint4
False
((0))
BillMeterGroupBaseAmountbit1
False
((0))
BilledCoveredCopiesBalancedecimal(18,6)9
True
UsedCoveredCopiesdecimal(18,6)9
False
((0))
NextBaseRatePerCopydecimal(18,6)9
True
NextBaseIncreaseDatedatetime8
True
NextBaseScheduleDetailIDint4
True
NextOvgIncreaseDatedatetime8
True
NextOvgScheduleDetailIDint4
True
NonAdjustedCoveredCopiesdecimal(18,6)9
True
NonAdjustedBaseRatePerCopydecimal(18,6)9
True
CoveredCopiesOvgMultiplierdecimal(18,6)9
False
CoveredCopiesBaseMultiplierdecimal(18,6)9
False
MeterGroupDetailIDint4
False
NonAdjustedNextCoveredCopiesDatedatetime8
True
Foreign Keys FK_SCQBillingMeterGroups_OverageBillingCycleID_SCBillingCycles: [dbo].[SCBillingCycles].OverageBillingCycleIDOverageBillingCycleIDint4
True
OverageFromDatedatetime8
True
OverageToDatedatetime8
True
NonAdjustedOverageNextBillingDatedatetime8
True
NonAdjustedOverageLastBillingDatedatetime8
True
OverageCyclesBilledint4
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK__SCQBilli__75F2D088B3220964: BillingMeterGroupIDPK__SCQBilli__75F2D088B3220964BillingMeterGroupID
True
80
NameColumns
FK_SCQBillingMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodesBaseDistributionCodeID->[dbo].[SCContractBaseDistCodes].[BaseDistributionCodeID]
FK_SCQBillingMeterGroups_BillingID_SCQBillingContractsBillingID->[dbo].[SCQBillingContracts].[BillingID]
ContractDetailID->[dbo].[SCQBillingContracts].[ContractDetailID]
FK_SCQBillingMeterGroups_OverageBillingCycleID_SCBillingCyclesOverageBillingCycleID->[dbo].[SCBillingCycles].[BillingCycleID]
FK_SCQBillingMeterGroups_OverageMethodID_SCOverageMethodsOverageMethodID->[dbo].[SCOverageMethods].[OverageMethodID]
CREATE TABLE [dbo].[SCQBillingMeterGroups]
(
[BillingMeterGroupID] [int] NOT NULL IDENTITY(1, 1),
[BillingID] [int] NOT NULL,
[ContractDetailID] [int] NOT NULL,
[OverageTypeID] [int] NOT NULL,
[ContractMeterGroupID] [int] NOT NULL,
[ContractMeterGroup] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ContractMeterGroupDescription] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CoveredCopies] [decimal] (18, 6) NULL,
[OvgChargeType] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GroupCopies] [decimal] (18, 6) NULL,
[CountedCopies] [decimal] (18, 6) NULL,
[BillableCopies] [decimal] (18, 6) NULL,
[TotalChargeAmount] [money] NULL,
[EffectiveRate] [decimal] (16, 6) NULL,
[MeterCount] [int] NOT NULL,
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NULL CONSTRAINT [DF_SCQBillingMeterGroups_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NULL CONSTRAINT [DF_SCQBillingMeterGroups_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[NextOvgMethod] [int] NULL,
[NextOvgRateIncreaseValue] [decimal] (16, 6) NULL,
[NextOvgRoundNoDigits] [int] NULL,
[OverageMethodID] [int] NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_OverageMethodID] DEFAULT ((1)),
[DistTaxAmount] [money] NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_DistTaxAmount] DEFAULT ((0)),
[NextCoveredCopies] [decimal] (18, 6) NULL,
[AvgGroupRate] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_AvgGroupRate] DEFAULT ((0)),
[BaseAmount] [money] NULL,
[OverageAmount] [money] NULL,
[BaseRatePerCopy] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_BaseRatePerCopy] DEFAULT ((0)),
[RoundBaseAmountDigits] [int] NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_RoundBaseAmountDigits] DEFAULT ((2)),
[BilledCoveredCopies] [decimal] (18, 6) NULL,
[BaseDistributionCodeID] [int] NULL,
[NextBaseMethod] [int] NULL,
[NextBaseRateIncreaseValue] [decimal] (16, 6) NULL,
[NextBaseRoundNoDigits] [int] NULL,
[NextCoveredCopiesDate] [datetime] NULL,
[CoveredCopiesPer] [int] NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_CoveredCopiesPer] DEFAULT ((0)),
[BillMeterGroupBaseAmount] [bit] NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_BillMeterGroupBaseAmount] DEFAULT ((0)),
[BilledCoveredCopiesBalance] [decimal] (18, 6) NULL,
[UsedCoveredCopies] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCQBillingMeterGroups_UsedCoveredCopies] DEFAULT ((0)),
[NextBaseRatePerCopy] [decimal] (18, 6) NULL,
[NextBaseIncreaseDate] [datetime] NULL,
[NextBaseScheduleDetailID] [int] NULL,
[NextOvgIncreaseDate] [datetime] NULL,
[NextOvgScheduleDetailID] [int] NULL,
[NonAdjustedCoveredCopies] [decimal] (18, 6) NULL,
[NonAdjustedBaseRatePerCopy] [decimal] (18, 6) NULL,
[CoveredCopiesOvgMultiplier] [decimal] (18, 6) NOT NULL,
[CoveredCopiesBaseMultiplier] [decimal] (18, 6) NOT NULL,
[MeterGroupDetailID] [int] NOT NULL,
[NonAdjustedNextCoveredCopiesDate] [datetime] NULL,
[OverageBillingCycleID] [int] NULL,
[OverageFromDate] [datetime] NULL,
[OverageToDate] [datetime] NULL,
[NonAdjustedOverageNextBillingDate] [datetime] NULL,
[NonAdjustedOverageLastBillingDate] [datetime] NULL,
[OverageCyclesBilled] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCQBillingMeterGroups] ADD CONSTRAINT [PK__SCQBilli__75F2D088B3220964] PRIMARY KEY CLUSTERED  ([BillingMeterGroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCQBillingMeterGroups] ADD CONSTRAINT [FK_SCQBillingMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodes] FOREIGN KEY ([BaseDistributionCodeID]) REFERENCES [dbo].[SCContractBaseDistCodes] ([BaseDistributionCodeID])
GO
ALTER TABLE [dbo].[SCQBillingMeterGroups] ADD CONSTRAINT [FK_SCQBillingMeterGroups_BillingID_SCQBillingContracts] FOREIGN KEY ([BillingID], [ContractDetailID]) REFERENCES [dbo].[SCQBillingContracts] ([BillingID], [ContractDetailID])
GO
ALTER TABLE [dbo].[SCQBillingMeterGroups] ADD CONSTRAINT [FK_SCQBillingMeterGroups_OverageBillingCycleID_SCBillingCycles] FOREIGN KEY ([OverageBillingCycleID]) REFERENCES [dbo].[SCBillingCycles] ([BillingCycleID])
GO
ALTER TABLE [dbo].[SCQBillingMeterGroups] ADD CONSTRAINT [FK_SCQBillingMeterGroups_OverageMethodID_SCOverageMethods] FOREIGN KEY ([OverageMethodID]) REFERENCES [dbo].[SCOverageMethods] ([OverageMethodID])
GO