RE 7.94 and above
SELECT RECORDS.FIRST_NAME + ' ' + RECORDS.Last_NAME AS Name, PHONES.NUM, TABLEENTRIES.LONGDESCRIPTION AS [Phone Type]

FROM RECORDS
INNER JOIN PHONES ON RECORDS.ID = PHONES.CONSTIT_ID
INNER JOIN TABLEENTRIES ON PHONES.PHONETYPEID = TABLEENTRIES.TABLEENTRIESID WHERE TABLEENTRIES.LONGDESCRIPTION = 'Home'


RE 7.93 and below
SELECT RECORDS.FIRST_NAME + ' ' + RECORDS.Last_NAME AS Name, PHONES.NUM, TABLEENTRIES.LONGDESCRIPTION AS [Phone Type]

FROM RECORDS
INNER JOIN CONSTIT_ADDRESS ON RECORDS.ID = CONSTIT_ADDRESS.CONSTIT_ID
INNER JOIN ADDRESS ON CONSTIT_ADDRESS.ADDRESS_ID = ADDRESS.ID
INNER JOIN CONSTIT_ADDRESS_PHONES ON CONSTIT_ADDRESS.ID = CONSTIT_ADDRESS_PHONES.CONSTITADDRESSID
INNER JOIN PHONES ON CONSTIT_ADDRESS_PHONES.PHONESID = PHONES.PHONESID
INNER JOIN TABLEENTRIES ON PHONES.PHONETYPEID = TABLEENTRIES.TABLEENTRIESID

WHERE
CONSTIT_ADDRESS.INDICATOR =2


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.