SALESORDERITEMSPONSORSHIP (3.0)

Sponsorship items that are part of sales orders.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

SPONSORSHIPID

uniqueidentifier

true

The sponsorship created for this sales order.

SPONSORSHIPPROGRAMID

uniqueidentifier

false

FK to SPONSORSHIPPROGRAM

SPONSORSHIPOPPORTUNITYID

uniqueidentifier

false

FK to SPONSORSHIPOPPORTUNITY

GIFTRECIPIENTID

uniqueidentifier

true

FK to CONSTITUENT

SPONSORSHIPLOCATIONID

uniqueidentifier

true

FK to SPONSORSHIPLOCATION

SPONSORSHIPOPPORTUNITYAGERANGEID

uniqueidentifier

true

FK to SPONSORSHIPOPPORTUNITYAGERANGE

SPROPPPROJECTCATEGORYCODEID

uniqueidentifier

true

FK to SPROPPPROJECTCATEGORYCODE

EXPIRATIONREASONID

uniqueidentifier

true

FK to SPONSORSHIPREASON

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

PDACCOUNTSYSTEMID

uniqueidentifier

true

Fields
Field Field Type Null Notes Description

STARTDATE

date

false

GENDERCODE

tinyint

false

0

0=Greatest need, 1=Male, 2=Female

GENDER

nvarchar(13) (Computed)

true

Provides a translation for the 'GENDERCODE' field.

ISHIVPOSITIVECODE

tinyint

false

0

0=Greatest need, 1=Yes, 2=No

ISHIVPOSITIVE

nvarchar(13) (Computed)

true

Provides a translation for the 'ISHIVPOSITIVECODE' field.

HASCONDITIONCODE

tinyint

false

0

0=Greatest need, 1=Yes, 2=No

HASCONDITION

nvarchar(13) (Computed)

true

Provides a translation for the 'HASCONDITIONCODE' field.

ISORPHANEDCODE

tinyint

false

0

0=Greatest need, 1=Yes, 2=No

ISORPHANED

nvarchar(13) (Computed)

true

Provides a translation for the 'ISORPHANEDCODE' field.

ISSOLESPONSORSHIP

bit

false

0

EXPIRATIONDATE

date

true

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.

MASKIMAGEID

int

false

0

Indexes
Index Name Field(s) Unique Primary Clustered

IX_SALESORDERITEMSPONSORSHIP_DATEADDED

DATEADDED

False

False

True

IX_SALESORDERITEMSPONSORSHIP_DATECHANGED

DATECHANGED

False

False

False

IX_SALESORDERITEMSPONSORSHIP_EXPIRATIONREASONID

EXPIRATIONREASONID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_GIFTRECIPIENTID

GIFTRECIPIENTID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPONSORSHIPID

SPONSORSHIPID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPONSORSHIPLOCATIONID

SPONSORSHIPLOCATIONID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPONSORSHIPOPPORTUNITYAGERANGEID

SPONSORSHIPOPPORTUNITYAGERANGEID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPONSORSHIPOPPORTUNITYID

SPONSORSHIPOPPORTUNITYID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPONSORSHIPPROGRAMID

SPONSORSHIPPROGRAMID

False

False

False

IX_SALESORDERITEMSPONSORSHIP_SPROPPPROJECTCATEGORYCODEID

SPROPPPROJECTCATEGORYCODEID

False

False

False

PK_SALESORDERITEMSPONSORSHIP

ID

True

True

False

Triggers
Trigger Name Description

TR_SALESORDERITEMSPONSORSHIP_AUDIT_UPDATE

TR_SALESORDERITEMSPONSORSHIP_AUDIT_DELETE