Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
SELECT count(c.chgno) as "Denied Claims"
FROM charge_t as c
inner join
payment_t as p
on c.chgno = p.chgno
where postingdate between '01/01/2017' and '12/31/2017' and p.payamt = 0 and p.correction = 'N' and p.msgcode1 is not null
Glad could be of help.
Please close the thread by marking the correct & helpful responses.
Usually, the answer is in the question.
Building on what Vamsee provided, you might try this
COUNT({<postingdate ={">$(=vStartDate)<=$(=vEndDate)"}, p.payamt = {0} , p.correction = {'N'}, p.msgcode1={'*'} -{''}>}chgno)
Since you want p.msgcode is not null, the expression in the set analysis read like this
(all except blank/null values)
p.msgcode1 ={'*'}-{''}