Microsoft SQL Query

SELECT GL7ACCOUNTS.ACCOUNTNUMBER, GL7ACCOUNTBUDGETS.AMOUNT, GL7FISCALPERIODS.STARTDATE,GL7FISCALPERIODS.ENDDATE,
GL7ACCOUNTBUDGETDETAILS.AMOUNT

FROM GL7BUDGETSCENARIOS
INNER JOIN GL7ACCOUNTBUDGETS ON GL7BUDGETSCENARIOS.GL7BUDGETSCENARIOSID=GL7ACCOUNTBUDGETS.GL7BUDGETSCENARIOSID
INNER JOIN GL7FISCALYEARS ON GL7BUDGETSCENARIOS.GL7FISCALYEARSID=GL7FISCALYEARS.GL7FISCALYEARSID
INNER JOIN GL7ACCOUNTS ON GL7ACCOUNTBUDGETS.GL7ACCOUNTSID=GL7ACCOUNTS.GL7ACCOUNTSID
INNER JOIN TABLEENTRIES ON GL7BUDGETSCENARIOS.SCENARIOID=TABLEENTRIES.TABLEENTRIESID
INNER JOIN GL7ACCOUNTBUDGETDETAILS ON GL7ACCOUNTBUDGETS.GL7ACCOUNTBUDGETSID=GL7ACCOUNTBUDGETDETAILS.GL7ACCOUNTBUDGETSID
INNER JOIN GL7FISCALPERIODS ON GL7ACCOUNTBUDGETDETAILS.GL7FISCALPERIODSID=GL7FISCALPERIODS.GL7FISCALPERIODSID

WHERE GL7FISCALYEARS.YEARID='2001' AND TABLEENTRIES.DESCRIPTION='Development'

Microsoft Access Query

SELECT
dbo_GL7ACCOUNTS.ACCOUNTNUMBER,
dbo_GL7ACCOUNTBUDGETS.AMOUNT,
dbo_GL7FISCALPERIODS.STARTDATE,
dbo_GL7FISCALPERIODS.ENDDATE,
dbo_GL7ACCOUNTBUDGETDETAILS.AMOUNT

FROM
(((((dbo_GL7BUDGETSCENARIOS INNER JOIN
dbo_GL7ACCOUNTBUDGETS ON
dbo_GL7BUDGETSCENARIOS.GL7BUDGETSCENARIOSID=dbo_GL7ACCOUNTBUDGETS.GL7BUDGETSCENARIOSID)
INNER JOIN dbo_GL7FISCALYEARS ON
dbo_GL7BUDGETSCENARIOS.GL7FISCALYEARSID=dbo_GL7FISCALYEARS.GL7FISCALYEARSID)
INNER JOIN dbo_GL7ACCOUNTS ON
dbo_GL7ACCOUNTBUDGETS.GL7ACCOUNTSID=dbo_GL7ACCOUNTS.GL7ACCOUNTSID)
INNER JOIN dbo_TABLEENTRIES ON
dbo_GL7BUDGETSCENARIOS.SCENARIOID=dbo_TABLEENTRIES.TABLEENTRIESID)
INNER JOIN dbo_GL7ACCOUNTBUDGETDETAILS ON
dbo_GL7ACCOUNTBUDGETS.GL7ACCOUNTBUDGETSID=dbo_GL7ACCOUNTBUDGETDETAILS.GL7ACCOUNTBUDGETSID)
INNER JOIN dbo_GL7FISCALPERIODS ON
dbo_GL7ACCOUNTBUDGETDETAILS.GL7FISCALPERIODSID=dbo_GL7FISCALPERIODS.GL7FISCALPERIODSID

WHERE
(((dbo_GL7FISCALYEARS.YEARID)="2001") AND ((dbo_TABLEENTRIES.DESCRIPTION)="Development"));

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.