Microsoft SQL Query:

SELECT

GIFT.DATEADDED,
( SELECT
CASE GIFT.TYPE
WHEN 1 THEN 'Cash' WHEN 2 THEN 'Pay-Cash'
WHEN 3 THEN 'MG Pay-Cash' WHEN 8 THEN 'Pledge'
WHEN 9 THEN 'Stock/Property' WHEN 10 THEN 'Stock/Property (Sold)'
WHEN 11 THEN 'Pay-Stock/Property' WHEN 12 THEN 'MG Pay-Stock/Property'
WHEN 13 THEN 'Pay-Stock/Property (Sold)' WHEN 14 THEN 'MG Pay-Stock/Property (Sold)'
WHEN 15 THEN 'Gift-in-Kind' WHEN 16 THEN 'Pay-Gift-in-Kind'
WHEN 17 THEN 'MG Pay-Gift-in-Kind' WHEN 18 THEN 'Other'
WHEN 19 THEN 'Pay-Other' WHEN 20 THEN 'MG Pay-Other'
WHEN 21 THEN 'Write Off' WHEN 22 THEN 'MG Write Off'
WHEN 27 THEN 'MG Pledge' WHEN 30 THEN 'Recurring Gift'
WHEN 31 THEN 'Recurring Gift Pay-Cash' WHEN 32 THEN 'GL Reversal'
WHEN 33 THEN 'Amendment' WHEN 34 THEN 'Planned Gift'
ELSE '' END) as "GIFT TYPE",
GiftSplit.Amount as "GIFT AMOUNT", GIFT.REF, SOLREC.FULL_NAME as "GIFT SOLICITOR NAME"

FROM GIFT
INNER JOIN GiftSplit ON GIFT.ID=GiftSplit.GiftId
INNER JOIN GiftSolicitor ON GIFT.ID=GiftSolicitor.ParentId
INNER JOIN RECORDS SOLREC ON GiftSolicitor.SolicitorId=SOLREC.ID


Microsoft Access Query:

SELECT
[dbo_GiftSplit].[Amount], [dbo_GIFT].[REF], [dbo_RECORDS].[FULL_NAME]

FROM

((dbo_GIFT INNER JOIN dbo_GiftSplit ON [dbo_GIFT].[ID]=[dbo_GiftSplit].[GiftId]) INNER JOIN dbo_GiftSolicitor ON [dbo_GIFT].[ID]=[dbo_GiftSolicitor].[ParentId]) INNER JOIN dbo_RECORDS ON [dbo_GiftSolicitor].[SolicitorId]=[dbo_RECORDS].[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.