The following can be used to return all gifts in the system and the constituency code:
SELECT r.CONSTITUENT_ID, r.LAST_NAME + ', ' + r.FIRST_NAME as 'NAME', te.LONGDESCRIPTION as 'Constituency on Gift', g.UserGiftId, g.DATEADDED, g.Amount FROM dbo.GIFT g JOIN dbo.TABLEENTRIES te on te.TABLEENTRIESID = g.CONSTITUENT_CODE JOIN dbo.RECORDS r on r.ID = g.CONSTIT_ID
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.