CAMPAIGN
                                        Stores information about campaigns .  
                                        Primary Key
                                        
                                            
                                                
                                                    | Primary Key | Field Type | 
                                            
                                            
                                                
                                                    | ID | uniqueidentifier | 
                                            
                                        
                                        Fields
                                        
                                            
                                                
                                                    | Field | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | USERID | nvarchar(100) |  | Default = '' | The default lookup ID for the campaign. | 
                                                
                                                    | NAME | nvarchar(100) |  | Default = '' | The name of the campaign. | 
                                                
                                                    | 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. | 
                                                
                                                    | DESCRIPTION | nvarchar(300) |  | Default = '' | A description of the campaign. | 
                                                
                                                    | STARTDATE | date | yes |  | The date the campaign began. | 
                                                
                                                    | ENDDATE | date | yes |  | The date the campaign ended. | 
                                                
                                                    | SEQUENCE | int |  | Default = 0 | Used by the hierarchy. | 
                                                
                                                    | HIERARCHYPATH | hierarchyid |  |  |  | 
                                                
                                                    | ISACTIVE | bit |  | Default = 1 | Is the campaign active? | 
                                            
                                        
                                        Foreign Keys
                                        
                                            
                                                
                                                    | Foreign Key | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | ADDEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | CHANGEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | CAMPAIGNTYPECODEID | uniqueidentifier | yes | CAMPAIGNTYPECODE.ID | The type of the campaign. | 
                                                
                                                    | BASECURRENCYID | uniqueidentifier | yes | CURRENCY.ID | The base currency associated with this campaign. | 
                                            
                                        
                                        Indexes
                                        
                                            
                                                
                                                    | Index Name | Fields | Unique | Primary | Clustered | 
                                            
                                            
                                                
                                                    | IX_CAMPAIGN_BASECURRENCYID | BASECURRENCYID |  |  |  | 
                                                
                                                    | IX_CAMPAIGN_DATEADDED | DATEADDED |  |  | yes | 
                                                
                                                    | IX_CAMPAIGN_DATECHANGED | DATECHANGED |  |  |  | 
                                                
                                                    | PK_CAMPAIGN | ID | yes | yes |  | 
                                                
                                                    | UC_CAMPAIGN_HIERARCHYPATH | HIERARCHYPATH | yes |  |  | 
                                                
                                                    | UC_CAMPAIGN_USERID | USERID | yes |  |  | 
                                            
                                        
                                        Triggers
                                        
                                        Referenced by