Hi,
I am pulling the following rows from a resultset, as you see that Acct no - 12345 repeats but has increasing PTID which are distinct. I need to get the row that has the highest PTID for acct no 12345 i.e. ptid 13310125. How do I do that? Please help. Below is the result of my query
Acct No | Acct Type | Effective Date | Row no | Cur Bal | Transaction | Prior Bal | PTID |
12345 | CK | 6/30/2010 0:00 | 10 | $101,200.40 | $3,000.00 | $104,200.40 | 13301633 |
12345 | CK | 6/30/2010 0:00 | 11 | $101,331.78 | ($131.38) | $101,200.40 | 13310125 |
54321 | CK | 6/30/2010 0:00 | 7 | $151,292.94 | ($292.20) | $151,000.74 | 13310504 |
I want to see my result as following
Acct No | Acct Type | Effective Date | Row no | Cur Bal | Transaction | Prior Bal | PTID |
12345 | CK | 6/30/2010 0:00 | 11 | $101,331.78 | ($131.38) | $101,200.40 | 13310125 |
54321 | CK | 6/30/2010 0:00 | 7 | $151,292.94 | ($292.20) | $151,000.74 | 13310504 |