MKTSOURCECODEITEM

Stores information for an element in a source code format.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
LENGTH tinyint Default = 1 The maximum length of this position.
SEQUENCE int Default = 0
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
SOURCECODEID uniqueidentifier MKTSOURCECODE.ID FK to MKTSOURCECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
MKTSOURCECODEPARTDEFINITIONID uniqueidentifier yes MKTSOURCECODEPARTDEFINITION.ID FK to MKTSOURCECODEPARTDEFINITION

Indexes

Index Name Fields Unique Primary Clustered
IX_MKTSOURCECODEITEM_DATEADDED DATEADDED yes
IX_MKTSOURCECODEITEM_DATECHANGED DATECHANGED
IX_MKTSOURCECODEITEM_ID ID
IX_MKTSOURCECODEITEM_MKTSOURCECODEPARTDEFINITIONID MKTSOURCECODEPARTDEFINITIONID
PK_MKTSOURCECODEITEM ID yes yes
UIX_MKTSOURCECODEITEM_SOURCECODEID_MKTSOURCECODEPARTDEFINITIONID SOURCECODEID, MKTSOURCECODEPARTDEFINITIONID yes

Triggers

Trigger Name Description
TR_MKTSOURCECODEITEM_AUDIT_UPDATE
TR_MKTSOURCECODEITEM_AUDIT_DELETE

Referenced by

Referenced by Field
MKTSOURCECODEVALIDPARTVALUES MKTSOURCECODEITEMID