Tables [dbo].[SCBillingAccountCodes]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:59:06 AM Thursday, March 21, 2019
Last Modified1:14:32 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_SCBillingAccountCodes: BillingAccountCodeIDBillingAccountCodeIDint4
False
1 - 1
Indexes IX_SCBillingAccountCodes_BillingAccountCodeBillingAccountCodevarchar(15)15
False
Descriptionvarchar(50)50
False
('')
Foreign Keys FK_SCBillingAccountCodes_LaborGLID_GLAccounts: [dbo].[GLAccounts].LaborGLIDLaborGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_LaborDeptID_GLDepts: [dbo].[GLDepts].LaborDeptIDLaborDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_LaborCostGLID_GLAccounts: [dbo].[GLAccounts].LaborCostGLIDLaborCostGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_LaborCostDeptID_GLDepts: [dbo].[GLDepts].LaborCostDeptIDLaborCostDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_LaborCostAppliedGLID_GLAccounts: [dbo].[GLAccounts].LaborCostAppliedGLIDLaborCostAppliedGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_LaborCostAppliedDeptID_GLDepts: [dbo].[GLDepts].LaborCostAppliedDeptIDLaborCostAppliedDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_TravelGLID_GLAccounts: [dbo].[GLAccounts].TravelGLIDTravelGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_TravelDeptID_GLDepts: [dbo].[GLDepts].TravelDeptIDTravelDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_TravelCostGLID_GLAccounts: [dbo].[GLAccounts].TravelCostGLIDTravelCostGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_TravelCostDeptID_GLDepts: [dbo].[GLDepts].TravelCostDeptIDTravelCostDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_TravelCostAppliedGLID_GLAccounts: [dbo].[GLAccounts].TravelCostAppliedGLIDTravelCostAppliedGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_TravelCostAppliedDeptID_GLDepts: [dbo].[GLDepts].TravelCostAppliedDeptIDTravelCostAppliedDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_MileageGLID_GLAccounts: [dbo].[GLAccounts].MileageGLIDMileageGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_MileageDeptID_GLDepts: [dbo].[GLDepts].MileageDeptIDMileageDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_MileageCostGLID_GLAccounts: [dbo].[GLAccounts].MileageCostGLIDMileageCostGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_MileageCostDeptID_GLDepts: [dbo].[GLDepts].MileageCostDeptIDMileageCostDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_MileageCostAppliedGLID_GLAccounts: [dbo].[GLAccounts].MileageCostAppliedGLIDMileageCostAppliedGLIDint4
False
Foreign Keys FK_SCBillingAccountCodes_MileageCostAppliedDeptID_GLDepts: [dbo].[GLDepts].MileageCostAppliedDeptIDMileageCostAppliedDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_MiscGLID_GLAccounts: [dbo].[GLAccounts].MiscGLIDMiscGLIDint4
True
Foreign Keys FK_SCBillingAccountCodes_MiscDeptID_GLDepts: [dbo].[GLDepts].MiscDeptIDMiscDeptIDint4
True
Foreign Keys FK_SCBillingAccountCodes_IncludedCogsGLID_GLAccounts: [dbo].[GLAccounts].IncludedCogsGLIDIncludedCogsGLIDint4
True
Foreign Keys FK_SCBillingAccountCodes_IncludedDeptID_GLDepts: [dbo].[GLDepts].IncludedDeptIDIncludedDeptIDint4
True
Activebit1
False
((1))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_SCBillingAccountCodes: BillingAccountCodeIDPK_SCBillingAccountCodesBillingAccountCodeID
True
80
IX_SCBillingAccountCodes_BillingAccountCodeBillingAccountCode
True
80
NameColumns
FK_SCBillingAccountCodes_IncludedCogsGLID_GLAccountsIncludedCogsGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_IncludedDeptID_GLDeptsIncludedDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_LaborCostAppliedDeptID_GLDeptsLaborCostAppliedDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_LaborCostAppliedGLID_GLAccountsLaborCostAppliedGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_LaborCostDeptID_GLDeptsLaborCostDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_LaborCostGLID_GLAccountsLaborCostGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_LaborDeptID_GLDeptsLaborDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_LaborGLID_GLAccountsLaborGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_MileageCostAppliedDeptID_GLDeptsMileageCostAppliedDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_MileageCostAppliedGLID_GLAccountsMileageCostAppliedGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_MileageCostDeptID_GLDeptsMileageCostDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_MileageCostGLID_GLAccountsMileageCostGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_MileageDeptID_GLDeptsMileageDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_MileageGLID_GLAccountsMileageGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_MiscDeptID_GLDeptsMiscDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_MiscGLID_GLAccountsMiscGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_TravelCostAppliedDeptID_GLDeptsTravelCostAppliedDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_TravelCostAppliedGLID_GLAccountsTravelCostAppliedGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_TravelCostDeptID_GLDeptsTravelCostDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_TravelCostGLID_GLAccountsTravelCostGLID->[dbo].[GLAccounts].[AccountID]
FK_SCBillingAccountCodes_TravelDeptID_GLDeptsTravelDeptID->[dbo].[GLDepts].[DeptID]
FK_SCBillingAccountCodes_TravelGLID_GLAccountsTravelGLID->[dbo].[GLAccounts].[AccountID]
CREATE TABLE [dbo].[SCBillingAccountCodes]
(
[BillingAccountCodeID] [int] NOT NULL IDENTITY(1, 1),
[BillingAccountCode] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCBillingAccountCodes_Description] DEFAULT (''),
[LaborGLID] [int] NOT NULL,
[LaborDeptID] [int] NULL,
[LaborCostGLID] [int] NOT NULL,
[LaborCostDeptID] [int] NULL,
[LaborCostAppliedGLID] [int] NOT NULL,
[LaborCostAppliedDeptID] [int] NULL,
[TravelGLID] [int] NOT NULL,
[TravelDeptID] [int] NULL,
[TravelCostGLID] [int] NOT NULL,
[TravelCostDeptID] [int] NULL,
[TravelCostAppliedGLID] [int] NOT NULL,
[TravelCostAppliedDeptID] [int] NULL,
[MileageGLID] [int] NOT NULL,
[MileageDeptID] [int] NULL,
[MileageCostGLID] [int] NOT NULL,
[MileageCostDeptID] [int] NULL,
[MileageCostAppliedGLID] [int] NOT NULL,
[MileageCostAppliedDeptID] [int] NULL,
[MiscGLID] [int] NULL,
[MiscDeptID] [int] NULL,
[IncludedCogsGLID] [int] NULL,
[IncludedDeptID] [int] NULL,
[Active] [bit] NOT NULL CONSTRAINT [DF_SCBillingAccountCodes_Active] 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_SCBillingAccountCodes_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingAccountCodes_LastUpdate] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [PK_SCBillingAccountCodes] PRIMARY KEY CLUSTERED  ([BillingAccountCodeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [IX_SCBillingAccountCodes_BillingAccountCode] UNIQUE NONCLUSTERED  ([BillingAccountCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_IncludedCogsGLID_GLAccounts] FOREIGN KEY ([IncludedCogsGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_IncludedDeptID_GLDepts] FOREIGN KEY ([IncludedDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborCostAppliedDeptID_GLDepts] FOREIGN KEY ([LaborCostAppliedDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborCostAppliedGLID_GLAccounts] FOREIGN KEY ([LaborCostAppliedGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborCostDeptID_GLDepts] FOREIGN KEY ([LaborCostDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborCostGLID_GLAccounts] FOREIGN KEY ([LaborCostGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborDeptID_GLDepts] FOREIGN KEY ([LaborDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_LaborGLID_GLAccounts] FOREIGN KEY ([LaborGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageCostAppliedDeptID_GLDepts] FOREIGN KEY ([MileageCostAppliedDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageCostAppliedGLID_GLAccounts] FOREIGN KEY ([MileageCostAppliedGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageCostDeptID_GLDepts] FOREIGN KEY ([MileageCostDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageCostGLID_GLAccounts] FOREIGN KEY ([MileageCostGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageDeptID_GLDepts] FOREIGN KEY ([MileageDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MileageGLID_GLAccounts] FOREIGN KEY ([MileageGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MiscDeptID_GLDepts] FOREIGN KEY ([MiscDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_MiscGLID_GLAccounts] FOREIGN KEY ([MiscGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelCostAppliedDeptID_GLDepts] FOREIGN KEY ([TravelCostAppliedDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelCostAppliedGLID_GLAccounts] FOREIGN KEY ([TravelCostAppliedGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelCostDeptID_GLDepts] FOREIGN KEY ([TravelCostDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelCostGLID_GLAccounts] FOREIGN KEY ([TravelCostGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelDeptID_GLDepts] FOREIGN KEY ([TravelDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCBillingAccountCodes] ADD CONSTRAINT [FK_SCBillingAccountCodes_TravelGLID_GLAccounts] FOREIGN KEY ([TravelGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO