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

How to find status Difference using date field - response (1) by dnoeth

$
0
0
Hi Josh, this should match your expected output: CASE WHEN status =200 THEN -1 ELSE MIN(CASE WHEN status =200 THEN CAST(status_date AS DATE) END) OVER (PARTITION BY vin_r ORDER BY status_date ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) - CAST(status_date AS DATE) END Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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