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

Syntax error: expected something between '(' and the 'current_date' keyword. - response (6) by malli123

$
0
0

Please find the below querys, it is not working on Monday and it is working on rest of days.
 
select distinct date '2013-12-23'-dayofweek(date '2013-12-23'-2)-1 from fact;
ans : 12/15/2013
select distinct date '2013-12-24'-dayofweek(date '2013-12-24'-2)-1 from fact;
12/22/2013
select distinct date '2013-12-25'-dayofweek(date '2013-12-25'-2)-1 from fact;
12/22/2013
12/22/2013 is the last week end date .
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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