Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 DISCOUNTSCENARIOID uniqueidentifier   Foreign key to a discount scenario in the SALESORDERITEMDISCOUNTOPTION table.
 SALESORDERITEMID uniqueidentifier   Foreign key to a SALESORDERITEM table.
 QUANTITY int   Default = 0 Number of order items in scenario.
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Key Field Type Null Notes Description
 SALESORDERID uniqueidentifier   SALESORDER.ID Foreign key to the SALESORDER table
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_SALESORDERITEMSCENARIOSDONE_DATEADDED DATEADDED    
 IX_SALESORDERITEMSCENARIOSDONE_DATECHANGED DATECHANGED      
 IX_SALESORDERITEMSCENARIOSDONE_SALESORDERID SALESORDERID      
 PK_SALESORDERITEMSCENARIOSDONE ID  

Trigger Name Description
 TR_SALESORDERITEMSCENARIOSDONE_AUDIT_UPDATE
 TR_SALESORDERITEMSCENARIOSDONE_AUDIT_DELETE

Entity-Relationship diagram of this table