Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

How do I get the latest row value?

$
0
0

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 NoAcct TypeEffective DateRow noCur BalTransactionPrior BalPTID
12345CK 6/30/2010 0:0010$101,200.40 $3,000.00 $104,200.40 13301633
12345CK 6/30/2010 0:0011$101,331.78 ($131.38)$101,200.40 13310125
54321CK 6/30/2010 0:007$151,292.94 ($292.20)$151,000.74 13310504

 

I want to see my result as following

Acct NoAcct TypeEffective DateRow noCur BalTransactionPrior BalPTID
12345CK 6/30/2010 0:0011$101,331.78($131.38)$101,200.4013310125
54321CK 6/30/2010 0:007$151,292.94($292.20)$151,000.7413310504

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>