I need to select Receipts that have not been deposited.
A person may pay by Cash, Cheque or by Cash and Cheque.
The deposit date fields (on the same row) are 'DepositDateCash' and 'DepositDateCheque'.
The amount fields are 'decCash' or 'decCheque'.
A person who pays in both cash and cheque may have two different deposit dates. For example, their cash deposit might happen on one day and their cheque deposit may not have happened yet.
In the above scenario I want to display the 'decCheque' amount was not deposited (amongst other fields).
This is part of the select query I'm trying to figure out.
CASE REC.strPaymenttype when "Cash" then "DepositDateCash" as 'DepositDate'
when "Cheque" then "DepositDateCheque" as 'DepositDate'
when "Cash and Cheque" then "???"
where depositdate is null