Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(60)   Default = '' User defined name of structure element
 LENGTH tinyint   Default = 2 Length of this structure element
 SEGMENTTYPECODE tinyint   Default = 3 Accounting Element type this structure element is associated with. Should match Accounting Element.
 SEGMENTTYPE nvarchar(12) (Computed) CASE [SEGMENTTYPECODE] WHEN 1 THEN N'Account code' WHEN 2 THEN N'Fund' WHEN 3 THEN N'User-defined' WHEN 4 THEN N'Endowment' WHEN 5 THEN N'Program' WHEN 6 THEN N'Event' WHEN 7 THEN N'Project' WHEN 8 THEN N'Grant' WHEN 9 THEN N'Membership' END Provides a translation for the 'SEGMENTTYPECODE' field.
 SEQUENCE int   Default = 0 Order this element appears in account string
 SEGMENTSEQUENCE tinyint   Default = 0 sequence just for account segments
 SEGMENTCOLUMN tinyint   Default = 0 Which column is the segment stored in for the account and transaction tables.
 ELEMENTTYPECODE tinyint   Default = 1 Account segment or transaction characteristic
 ELEMENTTYPE nvarchar(26) (Computed) CASE [ELEMENTTYPECODE] WHEN 1 THEN N'Account segment' WHEN 2 THEN N'Transaction characteristic' END Provides a translation for the 'ELEMENTTYPECODE' field.
 CLOSINGELEMENT bit   Default = 0 Is this a closing accounting element?
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 DEFAULTDESCRIPTIONSEQUENCE tinyint   Default = 0 Sequence for default account description
 DEFAULTDESCRIPTIONLENGTH tinyint   Default = 0 Length for the default account description
 SEPARATORCODE tinyint   Default = 1 Separator to use between account segments.
 SEPARATOR nvarchar(1) (Computed) CASE [SEPARATORCODE] WHEN 1 THEN N'-' WHEN 2 THEN N',' WHEN 3 THEN N'/' WHEN 4 THEN N';' WHEN 5 THEN N'.' END Provides a translation for the 'SEPARATORCODE' field.

Foreign Key Field Type Null Notes Description
 SITEID uniqueidentifier SITE.ID Site this structure element is valid for
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_ACCOUNTSTRUCTURE_DATEADDED DATEADDED    
 IX_ACCOUNTSTRUCTURE_DATECHANGED DATECHANGED      
 PK_ACCOUNTSTRUCTURE ID  
 UC_ACCOUNTSTRUCTURE_NAME NAME    
 UIX_ACCOUNTSTRUCTURE_SITEID_NAME SITEID, NAME    

Trigger Name Description
 TR_ACCOUNTSTRUCTURE_INSUPD
 TR_ACCOUNTSTRUCTURE_INS
 TR_ACCOUNTSTRUCTURE_AUDIT_UPDATE
 TR_ACCOUNTSTRUCTURE_AUDIT_DELETE

Referenced by Field
 DATAELEMENT GLACCOUNTSTRUCTUREID

Entity-Relationship diagram of this table