As an example that pulls these together a SQL statement that pulls the segment values for an account with a number of 01-1000-00 would be:

select ACCTS.ACCOUNTNUMBER, ACTSEGMENT.KEYVALUE
from dbo.GL7ACCOUNTSEGMENTS ACTSEGMENT
inner join dbo.GL7ACCOUNTS ACCTS on ACTSEGMENT.GL7ACCOUNTSID=ACCTS.GL7ACCOUNTSID
inner join dbo.GL7SEGMENTS SEGS on ACTSEGMENT.GL7SEGMENTSID=SEGS.GL7SEGMENTSID
where ACCTS.GL7ACCOUNTSID=1


Disclaimer: Blackbaud provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Structured Query Language and the tools used to create and modify SQL statements and Crystal Reports. Blackbaud Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.