Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

qualify rank() over (partition.....question - response (7) by Kanch

$
0
0

Hi Dieter , 
 
I have the similar requirement with slight change , need your Help in that -
 
My dataset is as below -
Company ID   Effective Date   Status Codes
C1                    1st March              JS
C1                     2nd March             AB
C1                     3rd March              ZB - previous row
C1                       4th March            JS
C1                     5th March              JS - current row
 
I want my resultset to return only current and preiosu record where there is change in the status , like  below
Company ID                     Current Status                Preious Status
C1                                        JS                                    ZB
can you please help me in this.
 
Thanks
Kanch


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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