select
        G.ID,
        R.ID,
        R3.FULL_NAME,
        T.DESCRIPTION,
        GT.ACKNOWLEDGEMENT,
        R2.FULL_NAME,
        GTA.SELFACKNOWLEDGE
from
        GIFT G
join RECORDS R
        on R.ID = G.CONSTIT_ID
join GIFT_TRIBUTE GT
        on GT.GIFT_ID = G.ID
join TRIBUTE T
        on T.ID = GT.TRIBUTE_ID
join RECORDS R3
        on R3.ID = T.RECORDS_ID
left join TRIBUTE_ACKNOWLEDGEE TA
        on TA.TRIBUTE_ID = T.ID
left join CONSTIT_RELATIONSHIPS CR
        on CR.ID = TA.RELATIONSHIPS_ID
left join RECORDS R2
        on R2.ID = CR.CONSTIT_ID
left join GIFT_TRIBUTE_ACKNOWLEDGEE GTA
        on GTA.GIFT_TRIBUTE_ID = GT.ID

 

In the above SQL code the GIFT_TRIBUTE_ACKNOWLEDGEE table will return values for a gift tribute if the "Ackn?" box is checked.  If that box is not checked the GIFT_TRIBUTE_ACKNOWLEDGEE table will return NULL values.

 

Blackbaud provides 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 that you are familiar with Structured Query Language and the tools used to create and modify SQL statements. Blackbaud Customer Support can help explain the functionality of a particular procedure but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the Read Only Database Assistance (RODBA), contact your Account Representative at solutions@blackbaud.com.