Hi All,
I have a logic that need an idea.
I work in a health care industry we deal with claims in SQL server. There will paid claims pended claims
Now I am working on pended claims. Below is the scenario
Below is the values that's gives my issues a perfect explanation.
1. The first claim 12055002900 has been pended twice with two different Pend Codes 'XM', 'XN' by the same user on same day
for this claim I jus need only MAX(Status Date) and its matching PEND CODE remaining lines should be eliminated.
i.e. STATUS DATE =6/5/13 9:29 AND PEND CD = XN
2. The last claim has pended twice but its on different dates by different user both lines should be on this report.
if it is pended twice on same day by different users then both should be selected.
Please I was almost there but missing something can you help help me out.
Thanks
Hemanth
hemanth