Note: This code is written and intended for use in SQL Server Query Analyzer and will not work in Microsoft Access.



SELECT

dbo.GIFT.DTE [Original Gift Date],

Sum(dbo.GiftPreviousSplit.Amount) AS [Original Gift Amount],

dbo.GiftAdjustment.AdjustmentId





FROM

(((dbo.GIFT INNER JOIN dbo.GiftAdjustment ON dbo.GIFT.ID  =  dbo.GiftAdjustment.GiftId) INNER JOIN dbo.GIFT AS GIFT_1 ON dbo.GiftAdjustment.AdjustmentId  =  GIFT_1.ID) INNER JOIN dbo.GiftSplit ON dbo.GIFT.ID  =  dbo.GiftSplit.GiftId) INNER JOIN dbo.GiftPreviousSplit ON GIFT_1.ID  =  dbo.GiftPreviousSplit.GiftId GROUP BY dbo.GIFT.DTE,

dbo.GiftAdjustment.AdjustmentId,

dbo.GiftAdjustment.GiftId;


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.