Tables [dbo].[SCContractMeterGroups]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:00 AM Thursday, March 21, 2019
Last Modified1:15:12 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_SCContractMeterGroups: ContractMeterGroupIDContractMeterGroupIDint4
False
1 - 1
ContractMeterGroupvarchar(64)64
False
Descriptionvarchar(128)128
False
Foreign Keys FK_SCContractMeterGroups_ContractID_SCContracts: [dbo].[SCContracts].ContractIDContractIDint4
False
CoveredCopiesdecimal(18,6)9
True
ApplyToExpirationbit1
True
OverageTypeIDint4
True
UseOveragesbit1
False
((0))
MeterCountint4
False
((1))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
NextOvgIncreaseDatedatetime8
True
NextOvgScheduleDetailIDint4
True
OvgRateScheduleStartDateTypeint4
True
OvgRateScheduleStartDatedatetime8
True
OvgRateScheduleIsRenewalTypebit1
True
((0))
Foreign Keys FK_SCContractMeterGroups_OverageMethodID_SCOverageMethods: [dbo].[SCOverageMethods].OverageMethodIDOverageMethodIDint4
False
((1))
CreditRatedecimal(18,6)9
False
((0))
Foreign Keys FK_SCContractMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodes: [dbo].[SCContractBaseDistCodes].BaseDistributionCodeIDBaseDistributionCodeIDint4
True
BilledCoveredCopiesBalancedecimal(18,6)9
False
((0))
BillMeterGroupBaseAmountbit1
False
((0))
BaseRatePerCopydecimal(18,6)9
False
((0))
RoundBaseAmountDigitsint4
False
((2))
UnearnedBalancemoney8
False
((0))
BaseRateScheduleIsRenewalTypebit1
True
((0))
BaseRateScheduleStartDatedatetime8
True
BaseRateScheduleStartDateTypeint4
True
NextBaseIncreaseDatedatetime8
True
NextBaseScheduleDetailIDint4
True
NextCoveredCopiesdecimal(18,6)9
True
NextCoveredCopiesDatedatetime8
True
CoveredCopiesPerint4
False
((0))
BilledCoveredCopiesBalanceAdjustmentdecimal(18,6)9
False
((0))
Foreign Keys FK_SCContractMeterGroups_OverageBillingCycleID_SCBillingCycles: [dbo].[SCBillingCycles].OverageBillingCycleIDOverageBillingCycleIDint4
True
OverageBilledThruDatedatetime8
True
OverageNextBillingDatedatetime8
True
OverageLastBillingDatedatetime8
True
OverageBilledThruDateInitialdatetime8
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_SCContractMeterGroups: ContractMeterGroupIDPK_SCContractMeterGroupsContractMeterGroupID
True
80
NameColumns
FK_SCContractMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodesBaseDistributionCodeID->[dbo].[SCContractBaseDistCodes].[BaseDistributionCodeID]
FK_SCContractMeterGroups_ContractID_SCContractsContractID->[dbo].[SCContracts].[ContractID]
FK_SCContractMeterGroups_OverageBillingCycleID_SCBillingCyclesOverageBillingCycleID->[dbo].[SCBillingCycles].[BillingCycleID]
FK_SCContractMeterGroups_OverageMethodID_SCOverageMethodsOverageMethodID->[dbo].[SCOverageMethods].[OverageMethodID]
CREATE TABLE [dbo].[SCContractMeterGroups]
(
[ContractMeterGroupID] [int] NOT NULL IDENTITY(1, 1),
[ContractMeterGroup] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ContractID] [int] NOT NULL,
[CoveredCopies] [decimal] (18, 6) NULL,
[ApplyToExpiration] [bit] NULL,
[OverageTypeID] [int] NULL,
[UseOverages] [bit] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_UseOverages] DEFAULT ((0)),
[MeterCount] [int] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_MeterCount] DEFAULT ((1)),
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[NextOvgIncreaseDate] [datetime] NULL,
[NextOvgScheduleDetailID] [int] NULL,
[OvgRateScheduleStartDateType] [int] NULL,
[OvgRateScheduleStartDate] [datetime] NULL,
[OvgRateScheduleIsRenewalType] [bit] NULL CONSTRAINT [DF_SCContractMeterGroups_OvgRateScheduleIsRenewalType] DEFAULT ((0)),
[OverageMethodID] [int] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_OverageMethodID] DEFAULT ((1)),
[CreditRate] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCContractMeterGroups_CreditRate] DEFAULT ((0)),
[BaseDistributionCodeID] [int] NULL,
[BilledCoveredCopiesBalance] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCContractMeterGroups_BilledCoveredCopiesBalance] DEFAULT ((0)),
[BillMeterGroupBaseAmount] [bit] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_BillMeterGroupBaseAmount] DEFAULT ((0)),
[BaseRatePerCopy] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCContractMeterGroups_BaseRatePerCopy] DEFAULT ((0)),
[RoundBaseAmountDigits] [int] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_RoundBaseAmountDigits] DEFAULT ((2)),
[UnearnedBalance] [money] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_UnearnedBalance] DEFAULT ((0)),
[BaseRateScheduleIsRenewalType] [bit] NULL CONSTRAINT [DF_SCContractMeterGroups_BaseRateScheduleIsRenewalType] DEFAULT ((0)),
[BaseRateScheduleStartDate] [datetime] NULL,
[BaseRateScheduleStartDateType] [int] NULL,
[NextBaseIncreaseDate] [datetime] NULL,
[NextBaseScheduleDetailID] [int] NULL,
[NextCoveredCopies] [decimal] (18, 6) NULL,
[NextCoveredCopiesDate] [datetime] NULL,
[CoveredCopiesPer] [int] NOT NULL CONSTRAINT [DF_SCContractMeterGroups_CoveredCopiesPer] DEFAULT ((0)),
[BilledCoveredCopiesBalanceAdjustment] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_SCContractMeterGroups_BilledCoveredCopiesBalanceAdjustment] DEFAULT ((0)),
[OverageBillingCycleID] [int] NULL,
[OverageBilledThruDate] [datetime] NULL,
[OverageNextBillingDate] [datetime] NULL,
[OverageLastBillingDate] [datetime] NULL,
[OverageBilledThruDateInitial] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCContractMeterGroups] ADD CONSTRAINT [PK_SCContractMeterGroups] PRIMARY KEY CLUSTERED  ([ContractMeterGroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCContractMeterGroups] ADD CONSTRAINT [FK_SCContractMeterGroups_BaseDistributionCodeID_SCContractBaseDistCodes] FOREIGN KEY ([BaseDistributionCodeID]) REFERENCES [dbo].[SCContractBaseDistCodes] ([BaseDistributionCodeID])
GO
ALTER TABLE [dbo].[SCContractMeterGroups] ADD CONSTRAINT [FK_SCContractMeterGroups_ContractID_SCContracts] FOREIGN KEY ([ContractID]) REFERENCES [dbo].[SCContracts] ([ContractID])
GO
ALTER TABLE [dbo].[SCContractMeterGroups] ADD CONSTRAINT [FK_SCContractMeterGroups_OverageBillingCycleID_SCBillingCycles] FOREIGN KEY ([OverageBillingCycleID]) REFERENCES [dbo].[SCBillingCycles] ([BillingCycleID])
GO
ALTER TABLE [dbo].[SCContractMeterGroups] ADD CONSTRAINT [FK_SCContractMeterGroups_OverageMethodID_SCOverageMethods] FOREIGN KEY ([OverageMethodID]) REFERENCES [dbo].[SCOverageMethods] ([OverageMethodID])
GO