SELECT r.CONSTITUENT_ID as 'ConstitLookupID', r.ID as 'Constit System ID', r.FULL_NAME, g.ID as 'Gift System ID', g.UserGiftId as 'GiftLookupID', g.Amount, g.DATEADDED, CASE g.ProcessedByEFT WHEN -1 then 'True' ELSE 'False' END as 'EFT?' FROM dbo.GIFT as g JOIN dbo.RECORDS as r on r.ID = g.CONSTIT_ID WHERE g.ProcessedByEFT = -1
The above should return all gifts that have the "EFT?" checkbox marked for true. Likewise, with the CASE portion of the SELECT, if a gift was not processed by EFT, the return would show "False" in the return versus 0.
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.