CONSTITUENTRECOGNITION
                                        Stores constituent recognition records.  
                                        Primary Key
                                        
                                            
                                                
                                                    | Primary Key | Field Type | 
                                            
                                            
                                                
                                                    | ID | uniqueidentifier | 
                                            
                                        
                                        Fields
                                        
                                            
                                                
                                                    | Field | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | JOINDATE | datetime |  |  | The date this constituent joined this recognition level. | 
                                                
                                                    | EXPIRATIONDATE | datetime | yes |  | The expiration date for this recognition record. Only valid for annual programs. | 
                                                
                                                    | TOTALAMOUNT | money |  | Default = 0 | The total amount given towards this recognition program. | 
                                                
                                                    | TOTALPLANNEDGIFTAMOUNT | money |  | Default = 0 | The total planned gift amount given towards this recognition program. | 
                                                
                                                    | STATUSCODE | tinyint |  | Default = 0 | Current status of the constituent recognition: 0 - Active, 1 - Dropped, 2 - Pending | 
                                                
                                                    | 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. | 
                                                
                                                    | COMMENTS | nvarchar(1000) |  | Default = '' | Remarks about this recognition. | 
                                                
                                                    | ISANONYMOUS | bit |  | Default = 0 | Indicates that this constituent wishes to be an anonymous member of this recognition program. | 
                                                
                                                    | ORGANIZATIONTOTALAMOUNT | money |  | Default = 0 | The total amount given towards this recognition program in organization currency. | 
                                                
                                                    | ORGANIZATIONTOTALPLANNEDGIFTAMOUNT | money |  | Default = 0 | The total planned gift amount given towards this recognition program in organization currency. | 
                                                
                                                    | STATUS | nvarchar(16) (Computed) | yes | CASE [STATUSCODE] WHEN 0 THEN N'Active' WHEN 1 THEN N'Dropped' WHEN 2 THEN N'Pending' WHEN 3 THEN N'Inactive (Merge)' END |  | 
                                            
                                        
                                        Foreign Keys
                                        
                                            
                                                
                                                    | Foreign Key | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | CONSTITUENTID | uniqueidentifier |  | CONSTITUENT.LOCALID | The constituent record that has earned this recognition level. | 
                                                
                                                    | RECOGNITIONPROGRAMID | uniqueidentifier |  | RECOGNITIONPROGRAM.ID | The recognition program that this constituent is in. | 
                                                
                                                    | RECOGNITIONLEVELID | uniqueidentifier |  | RECOGNITIONLEVEL.ID | The current recognition level for this constituent. | 
                                                
                                                    | ADDEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | CHANGEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | BASECURRENCYID | uniqueidentifier | yes | CURRENCY.ID | The base currency associated with this recognition program. | 
                                                
                                                    | ORGANIZATIONEXCHANGERATEID | uniqueidentifier | yes | CURRENCYEXCHANGERATE.ID | The exchange rate used to convert from recognition amount to organization recognition amount. | 
                                            
                                        
                                        Indexes
                                        
                                            
                                                
                                                    | Index Name | Fields | Unique | Primary | Clustered | 
                                            
                                            
                                                
                                                    | IX_CONSTITUENTRECOGNITION_BASECURRENCYID | BASECURRENCYID |  |  |  | 
                                                
                                                    | IX_CONSTITUENTRECOGNITION_CONSTITUENTID | CONSTITUENTID |  |  |  | 
                                                
                                                    | IX_CONSTITUENTRECOGNITION_DATEADDED | DATEADDED |  |  | yes | 
                                                
                                                    | IX_CONSTITUENTRECOGNITION_DATECHANGED | DATECHANGED |  |  |  | 
                                                
                                                    | IX_CONSTITUENTRECOGNITION_ORGANIZATIONEXCHANGERATEID | ORGANIZATIONEXCHANGERATEID |  |  |  | 
                                                
                                                    | IX_CONSTITUENTRECOGNITION_RECOGNITIONPROGRAMID | RECOGNITIONPROGRAMID |  |  |  | 
                                                
                                                    | PK_CONSTITUENTRECOGNITION | ID | yes | yes |  | 
                                            
                                        
                                        Triggers
                                        
                                        Referenced by