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

Get Prior record in Teradata based on date - response (1) by sachin.sebastian

$
0
0
Assuming the value of SEQ column will be in order, you can use the below sql to get the result: SEL CURR.AppNo,CURR.STS_CD,PREV.STS_CD,CURR.LOAN_NUM,CURR.DTE,PREV.DTE FROM <TABLE> CURR LEFT JOIN <TABLE> PREV ON CURR.AppNo = PREV.AppNo AND CURR.SEQ-1 = PREV.SEQ

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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