PROGRAMDOCUMENT (4.0SP20)

Links a document to a program

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

PROGRAMID

uniqueidentifier

false

FK to PROGRAM

DOCUMENTID

uniqueidentifier

false

FK to DOCUMENT

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

Fields
Field Field Type Null Notes Description

SEQUENCE

int

false

0

Describes the priority with which the templates will be chosen

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_PROGRAMDOCUMENT_DATEADDED

DATEADDED

False

False

True

IX_PROGRAMDOCUMENT_DATECHANGED

DATECHANGED

False

False

False

PK_PROGRAMDOCUMENT

ID

True

True

False

UIX_PROGRAMDOCUMENT_PROGRAMID_DOCUMENTID

PROGRAMID

DOCUMENTID

True

False

False

Triggers
Trigger Name Description

TR_PROGRAMDOCUMENT_AUDIT_UPDATE

TR_PROGRAMDOCUMENT_AUDIT_DELETE