Tables [dbo].[ICMfgMaterials]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:57:37 AM Thursday, March 21, 2019
Last Modified1:11:37 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ICMfgMaterials: MfgID\DetailIDForeign Keys FK_ICMfgMaterials_MfgID_ICMfgs: [dbo].[ICMfgs].MfgIDMfgIDint4
False
Cluster Primary Key PK_ICMfgMaterials: MfgID\DetailIDDetailIDint4
False
Foreign Keys FK_ICMfgMaterials_SubAssemblyID_ICMfgs: [dbo].[ICMfgs].SubAssemblyIDSubAssemblyIDint4
True
Foreign Keys FK_ICMfgMaterials_ItemID_ICItems: [dbo].[ICItems].ItemIDItemIDint4
False
SerialNumbervarchar(30)30
False
Quantitydecimal(18,6)9
False
Costmoney8
False
((0))
Foreign Keys FK_ICMfgMaterials_GLID_GLAccounts2: [dbo].[GLAccounts2].GLIDGLIDint4
False
Foreign Keys FK_ICMfgMaterials_DeptID_GLDepts2: [dbo].[GLDepts2].DeptIDDeptIDint4
True
Amountmoney8
False
((0))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Foreign Keys FK_ICMfgMaterials_StockTypeID_ICStockTypes: [dbo].[ICStockTypes].StockTypeIDStockTypeIDint4
False
((1))
AdjAmountmoney8
False
((0))
Foreign Keys FK_ICMfgMaterials_AdjGLID_GLAccounts: [dbo].[GLAccounts].AdjGLIDAdjGLIDint4
True
Foreign Keys FK_ICMfgMaterials_AdjDeptID_GLDepts: [dbo].[GLDepts].AdjDeptIDAdjDeptIDint4
True
InventoryRemovalCostmoney8
True
AssetCostOrBasisRemovalCostmoney8
False
((0.0))
AssetAccumDeprRemovalCostmoney8
False
((0.0))
AssetAccumDeprAmountmoney8
False
((0.0))
OverrideCostbit1
False
((0))
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_ICMfgMaterials: MfgID\DetailIDPK_ICMfgMaterialsMfgID, DetailID
True
80
NameColumns
FK_ICMfgMaterials_AdjDeptID_GLDeptsAdjDeptID->[dbo].[GLDepts].[DeptID]
FK_ICMfgMaterials_AdjGLID_GLAccountsAdjGLID->[dbo].[GLAccounts].[AccountID]
FK_ICMfgMaterials_DeptID_GLDepts2DeptID->[dbo].[GLDepts2].[DeptID]
FK_ICMfgMaterials_GLID_GLAccounts2GLID->[dbo].[GLAccounts2].[AccountID]
FK_ICMfgMaterials_ItemID_ICItemsItemID->[dbo].[ICItems].[ItemID]
FK_ICMfgMaterials_MfgID_ICMfgsMfgID->[dbo].[ICMfgs].[MfgID]
FK_ICMfgMaterials_StockTypeID_ICStockTypesStockTypeID->[dbo].[ICStockTypes].[StockTypeID]
FK_ICMfgMaterials_SubAssemblyID_ICMfgsSubAssemblyID->[dbo].[ICMfgs].[MfgID]
CREATE TABLE [dbo].[ICMfgMaterials]
(
[MfgID] [int] NOT NULL,
[DetailID] [int] NOT NULL,
[SubAssemblyID] [int] NULL,
[ItemID] [int] NOT NULL,
[SerialNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [decimal] (18, 6) NOT NULL,
[Cost] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_Cost] DEFAULT ((0)),
[GLID] [int] NOT NULL,
[DeptID] [int] NULL,
[Amount] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_Amount] 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_ICMfgMaterials_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ICMfgMaterials_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[StockTypeID] [int] NOT NULL CONSTRAINT [DF_ICMfgMaterials_StockTypeID] DEFAULT ((1)),
[AdjAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_AdjAmount] DEFAULT ((0)),
[AdjGLID] [int] NULL,
[AdjDeptID] [int] NULL,
[InventoryRemovalCost] [money] NULL,
[AssetCostOrBasisRemovalCost] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_AssetCostOrBasisRemovalCost] DEFAULT ((0.0)),
[AssetAccumDeprRemovalCost] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_AssetAccumDeprRemovalCost] DEFAULT ((0.0)),
[AssetAccumDeprAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgMaterials_AssetAccumDeprAmount] DEFAULT ((0.0)),
[OverrideCost] [bit] NOT NULL CONSTRAINT [DF_ICMfgMaterials_OverrideCost] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [PK_ICMfgMaterials] PRIMARY KEY CLUSTERED  ([MfgID], [DetailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_AdjDeptID_GLDepts] FOREIGN KEY ([AdjDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_AdjGLID_GLAccounts] FOREIGN KEY ([AdjGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_DeptID_GLDepts2] FOREIGN KEY ([DeptID]) REFERENCES [dbo].[GLDepts2] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_GLID_GLAccounts2] FOREIGN KEY ([GLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_ItemID_ICItems] FOREIGN KEY ([ItemID]) REFERENCES [dbo].[ICItems] ([ItemID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_MfgID_ICMfgs] FOREIGN KEY ([MfgID]) REFERENCES [dbo].[ICMfgs] ([MfgID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_StockTypeID_ICStockTypes] FOREIGN KEY ([StockTypeID]) REFERENCES [dbo].[ICStockTypes] ([StockTypeID])
GO
ALTER TABLE [dbo].[ICMfgMaterials] ADD CONSTRAINT [FK_ICMfgMaterials_SubAssemblyID_ICMfgs] FOREIGN KEY ([SubAssemblyID]) REFERENCES [dbo].[ICMfgs] ([MfgID])
GO