PDCONSTITUENCYORDER (4.0SP20)

Stores the hierarchy of constituency codes used to pick a single constituency code for a constituent

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

Fields
Field Field Type Null Notes Description

CONSTITUENCYCODEID

uniqueidentifier

false

ID from either CONSTITUENCYCODE or CONSTITUENCYSYSTEMNAME. Comes from V_CONSTITUENCY

SEQUENCE

int

false

0

Order in the constituency code heirarchy

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_PDCONSTITUENCYORDER_DATEADDED

DATEADDED

False

False

True

IX_PDCONSTITUENCYORDER_DATECHANGED

DATECHANGED

False

False

False

PK_PDCONSTITUENCYORDER

ID

True

True

False

UIX_PDCONSTITUENCYORDER_CONSTITUENCYCODEID

CONSTITUENCYCODEID

True

False

False

Triggers
Trigger Name Description

TR_PDCONSTITUENCYORDER_AUDIT_UPDATE

TR_PDCONSTITUENCYORDER_AUDIT_DELETE