BATCHMEMBERSHIP
                                        Stores membership batch information.  
                                        Primary Key
                                        
                                            
                                                
                                                    | Primary Key | Field Type | 
                                            
                                            
                                                
                                                    | ID | uniqueidentifier | 
                                            
                                        
                                        Fields
                                        
                                            
                                                
                                                    | Field | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | SEQUENCE | int |  | Default = 0 |  | 
                                                
                                                    | COMMENTS | nvarchar(1000) |  | Default = '' |  | 
                                                
                                                    | STATUSCODE | tinyint |  | Default = 0 | 0=Active, 2=Pending | 
                                                
                                                    | STATUS | nvarchar(7) (Computed) | yes | CASE [STATUSCODE] WHEN 0 THEN N'Active' WHEN 2 THEN N'Pending' END | Provides a translation for the 'STATUSCODE' field. | 
                                                
                                                    | SENDRENEWALCODE | tinyint |  | Default = 1 | 0=Giver, 1=Primary member, 2=Giver and primary member | 
                                                
                                                    | SENDRENEWAL | nvarchar(24) (Computed) | yes | CASE [SENDRENEWALCODE] WHEN 0 THEN N'Giver' WHEN 1 THEN N'Primary member' WHEN 2 THEN N'Giver and primary member' END | Provides a translation for the 'SENDRENEWALCODE' field. | 
                                                
                                                    | 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. | 
                                            
                                        
                                        Foreign Keys
                                        
                                            
                                                
                                                    | Foreign Key | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | BATCHID | uniqueidentifier |  | BATCH.ID | FK to BATCH | 
                                                
                                                    | MEMBERSHIPPROGRAMID | uniqueidentifier |  | MEMBERSHIPPROGRAM.ID | FK to MEMBERSHIPPROGRAM | 
                                                
                                                    | ADDEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | CHANGEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                            
                                        
                                        Indexes
                                        
                                            
                                                
                                                    | Index Name | Fields | Unique | Primary | Clustered | 
                                            
                                            
                                                
                                                    | IX_BATCHMEMBERSHIP_DATEADDED | DATEADDED |  |  | yes | 
                                                
                                                    | IX_BATCHMEMBERSHIP_DATECHANGED | DATECHANGED |  |  |  | 
                                                
                                                    | PK_BATCHMEMBERSHIP | ID | yes | yes |  | 
                                            
                                        
                                        Triggers
                                        
                                        Referenced by