Microsoft SQL Query:

SELECT EA7RECORDS.FIRSTNAME, EA7RECORDS.LASTNAME, EA7STUDENTS.EA7STUDENTSID as 'SYSTEM STUDENT ID', EA7RECORDS.USERDEFINEDID as 'CUSTOM STUDENT ID', ADDRESS.ADDRESSBLOCK, ADDRESS.CITY, ADDRESS.STATE, ADDRESS.POSTCODE, TABLEENTRIES.DESCRIPTION as PhoneType, ADDRESSLINKPHONES.NUM as PhoneNum

FROM ((ADDRESSLINKPHONES INNER JOIN PHONELINKS ON ADDRESSLINKPHONES.PHONESID = PHONELINKS.PHONESID)
INNER JOIN ((EA7STUDENTS INNER JOIN EA7RECORDS ON EA7STUDENTS.EA7RECORDSID = EA7RECORDS.EA7RECORDSID)
INNER JOIN (ADDRESSLINKS INNER JOIN ADDRESS ON ADDRESSLINKS.ADDRESSID = ADDRESS.ADDRESSID) ON EA7RECORDS.EA7RECORDSID = ADDRESSLINKS.PARENTRECORDID) ON PHONELINKS.ADDRESSLINKSID = ADDRESSLINKS.ADDRESSLINKSID)
INNER JOIN TABLEENTRIES ON ADDRESSLINKPHONES.PHONETYPE = TABLEENTRIES.TABLEENTRIESID

WHERE ADDRESSLINKS.PARENTRECORDTYPE=2

Microsoft Access Query:

SELECT

dbo_EA7RECORDS.FIRSTNAME, dbo_EA7RECORDS.LASTNAME, dbo_EA7STUDENTS.EA7STUDENTSID, dbo_
EA7RECORDS.USERDEFINEDID, dbo_ADDRESS.ADDRESSBLOCK, dbo_ADDRESS.CITY, dbo_ADDRESS.STATE, dbo_ADDRESS.POSTCODE, dbo_TABLEENTRIES.DESCRIPTION as PhoneType, dbo_ADDRESSLINKPHONES.NUM as PhoneNum

FROM

((dbo_ADDRESSLINKPHONES INNER JOIN dbo_PHONELINKS ON
dbo_ADDRESSLINKPHONES.PHONESID = dbo_PHONELINKS.PHONESID) INNER JOIN
((dbo_EA7STUDENTS INNER JOIN dbo_EA7RECORDS ON
dbo_EA7STUDENTS.EA7RECORDSID = dbo_EA7RECORDS.EA7RECORDSID) INNER JOIN
(dbo_ADDRESSLINKS INNER JOIN dbo_ADDRESS ON dbo_ADDRESSLINKS.ADDRESSID = dbo_ADDRESS.ADDRESSID) ON
dbo_EA7RECORDS.EA7RECORDSID = dbo_ADDRESSLINKS.PARENTRECORDID) ON
dbo_PHONELINKS.ADDRESSLINKSID = dbo_ADDRESSLINKS.ADDRESSLINKSID) INNER JOIN
dbo_TABLEENTRIES ON dbo_ADDRESSLINKPHONES.PHONETYPE = dbo_TABLEENTRIES.TABLEENTRIESID

WHERE

(((dbo_ADDRESSLINKS.PARENTRECORDTYPE)=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.