Tables [dbo].[ICServiceCodes]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:03 AM Thursday, March 21, 2019
Last Modified1:14:27 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ICServiceCodes: ServiceCodeIDServiceCodeIDint4
False
ServiceCodevarchar(15)15
False
Descriptionvarchar(50)50
False
Foreign Keys FK_ICServiceCodes_SalesGLID_GLAccounts2: [dbo].[GLAccounts2].SalesGLIDSalesGLIDint4
False
Foreign Keys FK_ICServiceCodes_SalesDeptID_GLDepts2: [dbo].[GLDepts2].SalesDeptIDSalesDeptIDint4
True
Foreign Keys FK_ICServiceCodes_SalesAdjGLID_GLAccounts2: [dbo].[GLAccounts2].SalesAdjGLIDSalesAdjGLIDint4
False
Foreign Keys FK_ICServiceCodes_CostOfGoodsGLID_GLAccounts2: [dbo].[GLAccounts2].CostOfGoodsGLIDCostOfGoodsGLIDint4
False
Categorychar(2)2
False
Activebit1
False
Locksint4
False
((0))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Foreign Keys FK_ICServiceCodes_CostOfGoodsAppliedGLID_GLAccounts: [dbo].[GLAccounts].CostOfGoodsAppliedGLIDCostOfGoodsAppliedGLIDint4
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_ICServiceCodes: ServiceCodeIDPK_ICServiceCodesServiceCodeID
True
80
NameColumns
FK_ICServiceCodes_CostOfGoodsAppliedGLID_GLAccountsCostOfGoodsAppliedGLID->[dbo].[GLAccounts].[AccountID]
FK_ICServiceCodes_CostOfGoodsGLID_GLAccounts2CostOfGoodsGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICServiceCodes_SalesAdjGLID_GLAccounts2SalesAdjGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICServiceCodes_SalesDeptID_GLDepts2SalesDeptID->[dbo].[GLDepts2].[DeptID]
FK_ICServiceCodes_SalesGLID_GLAccounts2SalesGLID->[dbo].[GLAccounts2].[AccountID]
CREATE TABLE [dbo].[ICServiceCodes]
(
[ServiceCodeID] [int] NOT NULL,
[ServiceCode] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SalesGLID] [int] NOT NULL,
[SalesDeptID] [int] NULL,
[SalesAdjGLID] [int] NOT NULL,
[CostOfGoodsGLID] [int] NOT NULL,
[Category] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Active] [bit] NOT NULL,
[Locks] [int] NOT NULL CONSTRAINT [DF_ICServiceCodes_Locks] DEFAULT ((0)),
[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_ICServiceCodes_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ICServiceCodes_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[CostOfGoodsAppliedGLID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [PK_ICServiceCodes] PRIMARY KEY CLUSTERED  ([ServiceCodeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [FK_ICServiceCodes_CostOfGoodsAppliedGLID_GLAccounts] FOREIGN KEY ([CostOfGoodsAppliedGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [FK_ICServiceCodes_CostOfGoodsGLID_GLAccounts2] FOREIGN KEY ([CostOfGoodsGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [FK_ICServiceCodes_SalesAdjGLID_GLAccounts2] FOREIGN KEY ([SalesAdjGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [FK_ICServiceCodes_SalesDeptID_GLDepts2] FOREIGN KEY ([SalesDeptID]) REFERENCES [dbo].[GLDepts2] ([DeptID])
GO
ALTER TABLE [dbo].[ICServiceCodes] ADD CONSTRAINT [FK_ICServiceCodes_SalesGLID_GLAccounts2] FOREIGN KEY ([SalesGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO