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

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

$
0
0

Hi Dieter ,
I am having a company record in table having different status stored  as below -
Comapny ID - company identifier
Effv Date - Date on which record is getting inserted to table
Staus Codes - Status codes linked to company identifier , which can be same or different thatn previous record.
Company ID   Effective Date   Status Codes
C1                    1st March              JS
C1                     2nd March             AB
C1                     3rd March              ZB 
C1                     4th March               JS
C1                     5th March              JS 
Here I want to return the company identifier along with
-it's currentstatus i.e. J S (5th March)
-it's previous status where there is a change i.e. Z B (3rd March).
Thanks for your Help!
 
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>