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

Report generating with dynamic SQL - response (1) by dnoeth

$
0
0
Hi Mallesh this should be what you're looking for: WHERE x BETWEEN CASE WHEN EXTRACT(DAY FROM CURRENT_DATE) >= 7 THEN CURRENT_DATE - 7 ELSE ADD_MONTHS(CURRENT_DATE - (EXTRACT(DAY FROM CURRENT_DATE)-1), -1) END AND CURRENT_DATE 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>