--Display constituent name and pledge balances for Gifts greater than $10
SELECT 
 GIFT.Amount "Gift Amount",
 DBO.Query_ConstitName(1,GIFT_RECORDS.LAST_NAME,GIFT_RECORDS.FIRST_NAME,GIFT_RECORDS.MIDDLE_NAME,GIFT_RECORDS.ORG_NAME,GIFT_RECORDS.KEY_INDICATOR,GIFT_RECORDS.CONSTITUENT_ID) "Name",
 GIFT_RECORDS.CONSTITUENT_ID "Constituent ID",
 DBO.Query_SingleGiftPledgebalance(GIFT.ID,GIFT.Type) "Gift Pledge Balance",
 GIFT.ID "QRECID"

FROM 
GIFT
INNER JOIN DBO.RECORDS AS GIFT_RECORDS ON GIFT.CONSTIT_ID = GIFT_RECORDS.ID

WHERE 
((GIFT.Amount > 10.00) AND ((GIFT.TYPE NOT IN ('28','32','33') OR (GIFT.TYPE IS NULL))))  
and DBO.Query_SingleGiftPledgebalance(GIFT.ID,GIFT.Type) IS NOT NULL

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.