BATCHPDACCOUNTSEGMENTMAPPING
                                        Batch table for account segment mappings  
                                        Primary Key
                                        
                                            
                                                
                                                    | Primary Key | Field Type | 
                                            
                                            
                                                
                                                    | ID | uniqueidentifier | 
                                            
                                        
                                        Fields
                                        
                                            
                                                
                                                    | Field | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | LONGDESCRIPTIONID | nvarchar(36) |  | Default = '' | FK (not enforced) to the table pointed to in the PDACCOUNTSTRUCTURE segment | 
                                                
                                                    | ISDEFAULT | bit |  | Default = 0 | Is this the default value for the segment. | 
                                                
                                                    | SEQUENCE | int |  | Default = 0 |  | 
                                                
                                                    | 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. | 
                                                
                                                    | LONGDESCRIPTION | nvarchar(512) (Computed) | yes | ([dbo].[UFN_PDACCOUNTSEGMENTMAP_GETLONGDESCRIPTION](LONGDESCRIPTIONID, ISDEFAULT)) | Long description. | 
                                            
                                        
                                        Foreign Keys
                                        
                                            
                                                
                                                    | Foreign Key | Field Type | Null | Notes | Description | 
                                            
                                            
                                                
                                                    | BATCHID | uniqueidentifier |  | BATCH.ID | FK to BATCH | 
                                                
                                                    | PDACCOUNTSTRUCTUREID | uniqueidentifier | yes | PDACCOUNTSTRUCTURE.ID | FK to linked account structure element. | 
                                                
                                                    | PDACCOUNTSEGMENTVALUEID | uniqueidentifier | yes | PDACCOUNTSEGMENTVALUE.ID | FK to the table pointed to in the PDAccountSegmentValue | 
                                                
                                                    | ADDEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                                
                                                    | CHANGEDBYID | uniqueidentifier |  | CHANGEAGENT.ID | FK to CHANGEAGENT. | 
                                            
                                        
                                        Indexes
                                        
                                            
                                                
                                                    | Index Name | Fields | Unique | Primary | Clustered | 
                                            
                                            
                                                
                                                    | IX_BATCHPDACCOUNTSEGMENTMAPPING_BATCHID | BATCHID |  |  |  | 
                                                
                                                    | IX_BATCHPDACCOUNTSEGMENTMAPPING_DATEADDED | DATEADDED |  |  | yes | 
                                                
                                                    | IX_BATCHPDACCOUNTSEGMENTMAPPING_DATECHANGED | DATECHANGED |  |  |  | 
                                                
                                                    | PK_BATCHPDACCOUNTSEGMENTMAPPING | ID | yes | yes |  | 
                                            
                                        
                                        Triggers
                                        
                                        Referenced by