SALESORDERMARKETINGINFORMATION (4.0SP20)

Stores marketing information relative to a sales order.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

COUNTRYID

uniqueidentifier

true

The country code for the sales order.

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

Fields
Field Field Type Null Notes Description

POSTCODE

nvarchar(12)

false

''

The zip code given for the sales order.

NOTCOLLECTED

bit

false

0

Indication of whether or not the patron declined to provide the post code.

DATEADDED

datetime

false

getdate()

Indicates the date this record was added.

DATECHANGED

datetime

false

getdate()

Indicates the date this record was last changed.

TS

timestamp

false

Timestamp.

TSLONG

bigint (Computed)

true

Numeric representation of the timestamp.

Indexes
Index Name Field(s) Unique Primary Clustered

IX_SALESORDERMARKETINGINFORMATION_DATEADDED

DATEADDED

False

False

True

IX_SALESORDERMARKETINGINFORMATION_DATECHANGED

DATECHANGED

False

False

False

PK_SALESORDERMARKETINGINFORMATION

ID

True

True

False

Triggers
Trigger Name Description

TR_SALESORDERMARKETINGINFORMATION_AUDIT_UPDATE

TR_SALESORDERMARKETINGINFORMATION_AUDIT_DELETE