The SQL table needed is the EA7ADDRESSOPTIONS table. This contains a boolean field PRIMARYADDRESS which has "-1" when TRUE and "0" when FALSE. Link this to the TABLEENTRIES table to determine the specific address type where the DESCRIPTION field would hold the types "Home" etc. The following illustrates a way to join these tables. 

select EA.DESCRIPTION, EA.PRIMARYADDRESS, TE.DESCRIPTION 
from EA7ADDRESSOPTIONS EA
left outer join TABLEENTRIES TE on EA.ADDRESSTYPE = TE.TABLEENTRIESID
-- Filter for Primary Address=true and Address Type=Home
where EA.PRIMARYADDRESS = -1 and TE.DESCRIPTION = 'Home'


Disclaimer: We provide 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. Our 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.