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

Find the two pre/post/both the Dates - response (4) by Mathuram

$
0
0
Thanks Dieter it is working fine.. below is the query i had done... SEL * FROM (SEL MATURITY,TIMEPD, ROW_NUMBER() OVER(PARTITION BY MATURITY ORDER BY TIMEPD DESC) RN FROM DTFD WHERE MATURITY>TIMEPD UNION ALL SEL MATURITY,TIMEPD, ROW_NUMBER() OVER(PARTITION BY MATURITY ORDER BY TIMEPD ) FROM DTFD WHERE MATURITY<TIMEPD)T QUALIFY ROW_NUMBER() OVER(PARTITION BY MATURITY ORDER BY MATURITY,RN)<=2

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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