SyntaxFix
Write A Post
Hire A Developer
Questions
select CPaymentType, sum(CAmount) from TableOrderPayment where (CPaymentType = 'Cash' and CStatus = 'Active') or (CPaymentType = 'Check' and CDate <= bsysdatetime() abd CStatus = 'Active') group by CPaymentType
Cheers -