l******9 发帖数: 579 | 1 I am working on Access 2012 on win 7. In a table, I need to change a year
date format from '1-Jan-06' to 2006 and from '1-Jan-90' to 1990. I only need
year.
This is my query
SELECT *,
CASE
WHEN CAST(right(year_date,2) , INT) <= 12
THEN 2000 + CAST(right(year_date,2) , INT)
ELSE 1900 + CAST(right(year_date,2) , INT)
END
FROM my_table;
I got error:
syntax error (missing operator) in the query expression of 'CASE -- END'. | g*******g 发帖数: 59 | 2 版主管管吧,天天发这种0回复贴。。。看的版面混乱,要发去数据版统计版发啊! |
|