This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT je.* | |
FROM journal_entry AS je ON a.assetID = je.assetID | |
AND je.reference IN ('OPEN','AQ','DR') | |
AND CASE WHEN je.reference = 'DR' THEN je.description LIKE 'Direct Reinvestment%' ELSE 1=1 END | |
AND je.entryType = 'debit' | |
AND IFNULL(je.assetID,0) > 0 | |
/* some join conditions for the je table, can vary depending on what's being joined (account or asset) */ | |
LEFT JOIN journal_entry AS aj ON je.fundID = aj.fundID | |
AND je.memberAccountID = aj.memberAccountID |
NewerOlder