Contains the date ranges for which constituents are sponsors.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
DATEFROM |
date |
yes |
|
|
DATETO |
date |
yes |
|
|
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) |
yes |
CONVERT(bigint, TS) |
Numeric representation of the timestamp. |
SPONSORTYPECODE |
tinyint |
|
Default = 0 |
0=Sponsor, 1=Sponsorship recipient, 2=Sponsorship donor |
SPONSORTYPE |
nvarchar(21) (Computed) |
yes |
CASE [SPONSORTYPECODE] WHEN 0 THEN N'Sponsor' WHEN 1 THEN N'Sponsorship recipient' WHEN 2 THEN N'Sponsorship donor' END |
Provides a translation for the 'SPONSORTYPECODE' field. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
CONSTITUENTID |
uniqueidentifier |
|
CONSTITUENT.LOCALID
|
FK to CONSTITUENT |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_SPONSORDATERANGE_CONSTITUENTID |
CONSTITUENTID |
|
|
|
IX_SPONSORDATERANGE_DATEADDED |
DATEADDED |
|
|
yes |
IX_SPONSORDATERANGE_DATECHANGED |
DATECHANGED |
|
|
|
PK_SPONSORDATERANGE |
ID |
yes |
yes |
|
Triggers