Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Equivalent function for DATEADD - response (2) by Monica_a

$
0
0

Hi,
I need to get data of  8 consucutive weeks from the current date by displaying first Monday  of each week. I have used this query which will give 1 week data by displaying first  monday  of the week.Smilar to this need to get 8 consecutive weeks from the date when report is refreshed
 
CASE WHEN DAYOFWEEK(APPOINTMENT_START_DATE.BI_ACTIVITY_DATE-2) = 7 THEN  APPOINTMENT_START_DATE.BI_ACTIVITY_DATE
ELSE APPOINTMENT_START_DATE.BI_ACTIVITY_DATE-(DAYOFWEEK(APPOINTMENT_START_DATE.BI_ACTIVITY_DATE-2)) END+0

 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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