日期是两个字符串拼成的字符串再用to_date转成日期格式,这个日期直接给个sysdate是可以的,郁闷了
Select CASE to_char(to_date(CONCAT('2017','-01-02'),'yyyy-mm-dd'),'day') WHEN 'monday' THEN 1 WHEN 'tuesday' THEN 2 WHEN 'wednesday' THEN 3 WHEN 'thursday' THEN 4 WHEN 'friday' THEN 5 WHEN 'saturday' THEN 6 WHEN 'sunday' THEN 7 END
from dual