BATCHSPONSORSHIPCONSTITUENT
Stores data for constituents added to sponsorship batch.
Primary Key
Primary Key | Field Type |
---|---|
ID | uniqueidentifier |
Fields
Field | Field Type | Null | Notes | Description |
---|---|---|---|---|
KEYNAME | nvarchar(100) | Default = '' | Last name for individuals, Org name for organizations. | |
KEYNAMEPREFIX | nvarchar(50) | Default = '' | For organizations, stores the name contents before the sort break slash. | |
FIRSTNAME | nvarchar(50) | Default = '' | For individuals, stores the first name. | |
MIDDLENAME | nvarchar(50) | Default = '' | For individuals, stores the middle name. | |
MAIDENNAME | nvarchar(100) | Default = '' | For individuals, stores the maiden name. | |
NICKNAME | nvarchar(50) | Default = '' | For individuals, stores the nickname. | |
GENDERCODE | tinyint | Default = 0 | 0=Unknown, 1=Male, 2=Female | |
GENDER | nvarchar(7) (Computed) | yes | CASE [GENDERCODE] WHEN 0 THEN N'Unknown' WHEN 1 THEN N'Male' WHEN 2 THEN N'Female' END | Provides a translation for the 'GENDERCODE' field. |
BIRTHDATE | UDT_FUZZYDATE | Default = '00000000' | For individuals, stores the date of birth. | |
ISORGANIZATION | bit | Default = 0 | Indicates whether a record is an organization. | |
NUMEMPLOYEES | int | Default = 0 | For organizations, stores the number of employees. | |
NUMSUBSIDIARIES | int | Default = 0 | For organizations, stores the number of subsidiary organizations. | |
DONOTMAIL | bit | Default = 0 | ||
ADDRESSBLOCK | nvarchar(150) | Default = '' | Contains the address lines. | |
CITY | nvarchar(50) | Default = '' | Contains the address city. | |
POSTCODE | nvarchar(12) | Default = '' | Contains the address post code. | |
DPC | nvarchar(8) | Default = '' | Contains the address delivery point code | |
CART | nvarchar(10) | Default = '' | Contains the address carrier route (CART). | |
LOT | nvarchar(5) | Default = '' | Contains the address LOT. | |
OMITFROMVALIDATION | bit | Default = 0 | Indicates this address should be omitted from validation. | |
LASTVALIDATIONATTEMPTDATE | datetime | yes | Contains the date that this address was last validated. | |
VALIDATIONMESSAGE | nvarchar(200) | Default = '' | Stores the validation message. | |
CERTIFICATIONDATA | int | Default = 0 | Contains the certification data which shows with which release of the Postal Datafiles this address was last validated. | |
NUMBER | nvarchar(100) | Default = '' | Stores the phone number. | |
EMAILADDRESS | UDT_EMAILADDRESS | Default = '' | The constituent's email address. | |
WEBADDRESS | UDT_WEBADDRESS | Default = '' | The constituent's web address. | |
ISGROUP | bit | Default = 0 | Indicates whether a record is a group | |
GIVESANONYMOUSLY | bit | Default = 0 | Indicates whether or not the record gives anonymously. | |
GROUPTYPECODE | tinyint | Default = 0 | Indicates the type of group. A group type of Custom indicates that GROUPTYPEID will point to a custom group type record in the GROUPTYPE table. | |
GROUPTYPE | nvarchar(9) (Computed) | yes | CASE [GROUPTYPECODE] WHEN 0 THEN N'Household' WHEN 1 THEN N'Custom' END | Provides a translation for the 'GROUPTYPECODE' field. |
GROUPDESCRIPTION | nvarchar(300) | Default = '' | Provides a user-friendly description of the purpose of a group. | |
GROUPSTARTDATE | datetime | yes | The date of the group's inception | |
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. |
DONOTCALL | bit | Default = 0 | Indicates whether the constituent should be called at the phone [NUMBER] in this record | |
DONOTEMAIL | bit | Default = 0 | Indicates whether the constituent should be contacted at the [EMAILADDRESS] in this record | |
NAME | nvarchar(154) (Computed) | yes | CASE ISORGANIZATION WHEN 1 THEN CASE KEYNAMEPREFIX WHEN '' THEN KEYNAME ELSE KEYNAMEPREFIX + ' ' + KEYNAME END ELSE CASE FIRSTNAME WHEN '' THEN '' ELSE FIRSTNAME + ' ' END + CASE MIDDLENAME WHEN '' THEN '' ELSE LEFT(MIDDLENAME,1) + '. ' END + KEYNAME END | Returns the constituent name (First + Middle Initial + Last (individuals), Prefix + Org name (orgs)). |
Foreign Keys
Foreign Key | Field Type | Null | Notes | Description |
---|---|---|---|---|
EXISTINGCONSTITUENTID | uniqueidentifier | yes | CONSTITUENT.LOCALID | FK to CONSTITUENT |
TITLECODEID | uniqueidentifier | yes | TITLECODE.LOCALID | FK to TITLECODE |
SUFFIXCODEID | uniqueidentifier | yes | SUFFIXCODE.LOCALID | FK to SUFFIXCODE |
MARITALSTATUSCODEID | uniqueidentifier | yes | MARITALSTATUSCODE.LOCALID | FK to MARITALSTATUSCODE |
INDUSTRYCODEID | uniqueidentifier | yes | INDUSTRYCODE.LOCALID | FK to INDUSTRYCODE |
PARENTCORPID | uniqueidentifier | yes | CONSTITUENT.LOCALID | FK to CONSTITUENT |
ADDRESSTYPECODEID | uniqueidentifier | yes | ADDRESSTYPECODE.ID | FK to ADDRESSTYPECODE |
DONOTMAILREASONCODEID | uniqueidentifier | yes | DONOTMAILREASONCODE.ID | FK to DONOTMAILREASONCODE |
COUNTRYID | uniqueidentifier | yes | COUNTRY.LOCALID | FK to COUNTRY |
STATEID | uniqueidentifier | yes | STATE.LOCALID | FK to STATE |
COUNTYCODEID | uniqueidentifier | yes | COUNTYCODE.LOCALID | FK to COUNTYCODE |
CONGRESSIONALDISTRICTCODEID | uniqueidentifier | yes | CONGRESSIONALDISTRICTCODE.ID | FK to CONGRESSIONALDISTRICTCODE |
PHONETYPECODEID | uniqueidentifier | yes | PHONETYPECODE.LOCALID | FK to PHONETYPECODE |
EMAILADDRESSTYPECODEID | uniqueidentifier | yes | EMAILADDRESSTYPECODE.ID | FK to EMAILADDRESSTYPECODE |
CURRENTAPPUSERID | uniqueidentifier | yes | APPUSER.ID | FK to APPUSER |
GROUPTYPEID | uniqueidentifier | yes | GROUPTYPE.ID | Points to a custom group type definition in the GROUPTYPE table |
ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
NAMEFORMATFUNCTIONID | uniqueidentifier | yes | NAMEFORMATFUNCTION.ID | The name format function which will be used to generate the household name if specified. |
Indexes
Index Name | Fields | Unique | Primary | Clustered |
---|---|---|---|---|
IX_BATCHSPONSORSHIPCONSTITUENT_ADDRESSTYPECODEID | ADDRESSTYPECODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_CONGRESSIONALDISTRICTCODEID | CONGRESSIONALDISTRICTCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_COUNTRYID | COUNTRYID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_COUNTYCODEID | COUNTYCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_CURRENTAPPUSERID | CURRENTAPPUSERID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_DATEADDED | DATEADDED | yes | ||
IX_BATCHSPONSORSHIPCONSTITUENT_DATECHANGED | DATECHANGED | |||
IX_BATCHSPONSORSHIPCONSTITUENT_DONOTMAILREASONCODEID | DONOTMAILREASONCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_EMAILADDRESSTYPECODEID | EMAILADDRESSTYPECODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_EXISTINGCONSTITUENTID | EXISTINGCONSTITUENTID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_GROUPTYPEID | GROUPTYPEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_INDUSTRYCODEID | INDUSTRYCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_MARITALSTATUSCODEID | MARITALSTATUSCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_PARENTCORPID | PARENTCORPID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_PHONETYPECODEID | PHONETYPECODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_STATEID | STATEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_SUFFIXCODEID | SUFFIXCODEID | |||
IX_BATCHSPONSORSHIPCONSTITUENT_TITLECODEID | TITLECODEID | |||
PK_BATCHSPONSORSHIPCONSTITUENT | ID | yes | yes |
Triggers
Trigger Name | Description |
---|---|
TR_BATCHSPONSORSHIPCONSTITUENT_AUDIT_UPDATE | |
TR_BATCHSPONSORSHIPCONSTITUENT_AUDIT_DELETE |
Referenced by
Referenced by | Field |
---|---|
BATCHSPONSORSHIPCONSTITUENTACCOUNT | CONSTITUENTID |
BATCHSPONSORSHIPCONSTITUENTGROUPMEMBER | GROUPID |
BATCHSPONSORSHIPCONSTITUENTGROUPMEMBER | MEMBERID |
BATCHSPONSORSHIPCONSTITUENTRELATION | CONSTITUENTID |
BATCHSPONSORSHIPCONSTITUENTRELATION | RELATIONID |