Tables [dbo].[ICDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)24317
Created4:57:07 PM Thursday, September 7, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_ICDetail: ICDPriKeyICDPriKeyint4
No
1 - 1
Foreign Keys FK_ICDetail_ItemCode: [dbo].[ItemCode].ICPriKeyIndexes IX_ICDetail_ICAuthCommMTGDT: ICPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyICPriKeyint4
No
Foreign Keys FK_ICDetail_CommType: [dbo].[CommType].CommodityPriKeyIndexes IX_ICDetail_ICAuthCommMTGDT: ICPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyCommodityPriKeyint4
Yes
RevGLAccountvarchar(16)16
Yes
RevGLSubAccountvarchar(16)16
Yes
Foreign Keys FK_ICDetail_AUTHORITYTYPES: [dbo].[AuthorityTypes].AuthPriKeyIndexes IX_ICDetail_ICAuthCommMTGDT: ICPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyAuthPriKeyint4
Yes
Foreign Keys FK_ICDetail_DriverTypes: [dbo].[DriverTypes].DTPriKeyIndexes IX_ICDetail_ICAuthCommMTGDT: ICPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyDTPriKeyint4
Yes
GLDefaultchar(1)1
Yes
Foreign Keys FK_ICDetail_MoveTypeGroups: [dbo].[MoveTypeGroups].MTGroupPriKeyIndexes IX_ICDetail_ICAuthCommMTGDT: ICPriKey\AuthPriKey\CommodityPriKey\MTGroupPriKey\DTPriKeyMTGroupPriKeyint4
Yes
ServTypeGPriKeyint4
Yes
PayGLAccountvarchar(16)16
Yes
PayGLSubAccountvarchar(16)16
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_ICDetail: ICDPriKeyPK_ICDetailICDPriKey
Yes
80
IX_ICDetail_ICAuthCommMTGDTICPriKey, AuthPriKey, CommodityPriKey, MTGroupPriKey, DTPriKey
Yes
80
Check Constraints Check Constraints
NameConstraint
CK_ICDetail_GLDefault((1)<>[dbo].[ICDetailDefaultExists]([ICPriKey],[ICDPriKey],[GLDefault]))
Foreign Keys Foreign Keys
NameColumns
FK_ICDetail_AUTHORITYTYPESAuthPriKey->[dbo].[AuthorityTypes].[AuthPriKey]
FK_ICDetail_CommTypeCommodityPriKey->[dbo].[CommType].[PriKey]
FK_ICDetail_DriverTypesDTPriKey->[dbo].[DriverTypes].[DTPriKey]
FK_ICDetail_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
FK_ICDetail_MoveTypeGroupsMTGroupPriKey->[dbo].[MoveTypeGroups].[MTGroupPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ICDetail]
(
[ICDPriKey] [int] NOT NULL IDENTITY(1, 1),
[ICPriKey] [int] NOT NULL,
[CommodityPriKey] [int] NULL,
[RevGLAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RevGLSubAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AuthPriKey] [int] NULL,
[DTPriKey] [int] NULL,
[GLDefault] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MTGroupPriKey] [int] NULL,
[ServTypeGPriKey] [int] NULL,
[PayGLAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PayGLSubAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [CK_ICDetail_GLDefault] CHECK (((1)<>[dbo].[ICDetailDefaultExists]([ICPriKey],[ICDPriKey],[GLDefault])))
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [PK_ICDetail] PRIMARY KEY CLUSTERED  ([ICDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [IX_ICDetail_ICAuthCommMTGDT] UNIQUE NONCLUSTERED  ([ICPriKey], [AuthPriKey], [CommodityPriKey], [MTGroupPriKey], [DTPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [FK_ICDetail_AUTHORITYTYPES] FOREIGN KEY ([AuthPriKey]) REFERENCES [dbo].[AuthorityTypes] ([AuthPriKey])
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [FK_ICDetail_CommType] FOREIGN KEY ([CommodityPriKey]) REFERENCES [dbo].[CommType] ([PriKey])
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [FK_ICDetail_DriverTypes] FOREIGN KEY ([DTPriKey]) REFERENCES [dbo].[DriverTypes] ([DTPriKey])
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [FK_ICDetail_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[ICDetail] ADD CONSTRAINT [FK_ICDetail_MoveTypeGroups] FOREIGN KEY ([MTGroupPriKey]) REFERENCES [dbo].[MoveTypeGroups] ([MTGroupPriKey])
GO
GRANT SELECT ON  [dbo].[ICDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[ICDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[ICDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[ICDetail] TO [MssExec]
GO
Uses
Used By