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

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

$
0
0

try,
 
SELECT s22.wk_dt
FROM attr_table s21
CROSS JOIN TIME s22
CROSS JOIN
(SELECT day_of_week FROM sys_calendar.CALENDAR WHERE calendar_date = CURRENT_DATE) AS a
WHERE (s21.DC_LOC_ID,s22.wk_dt) IN (SEL A.DC, B.wk_dt FROM fact B
JOIN (SELECT DC_LOC_ID DC, MAX(INV_DT) inv_DT FROM INV_SCH GROUP BY DC_LOC_ID WHERE pinv_dt < CURRENT_DATE-day_of_week +1) A
ON B.DC_LOC_ID=A.DC
GROUP BY s22.FSCL_WK_END_DT. 
 
 
Best regards


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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