由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - change year format in Access by SQL query (转载)
相关主题
error of sql query in MS Access database请帮忙回答一个SQL问题
Job opening in CT: Software Quality Engineer求助啊,Amazon的software quality engineer的phone interview
请推荐SQL书请教SQL问题
SQL query 求解!【招聘】统计师-上海-全职-互联网广告
问个SQL query面试面数据结构、算法、玩C++,现在每天工作我……
请教SQL Query 面试题没有技术背景的Analyst在湾区真的能做得长久么?
考大家一道SQL面试题刷题:SQL code and Query optimization
公司招聘BI reporting developer有什么网站能练SQL的?
相关话题的讨论汇总
话题: year话题: access话题: query话题: int话题: cast
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Quant 讨论区 】
发信人: light009 (light009), 信区: Quant
标 题: change year format in Access by SQL query
发信站: BBS 未名空间站 (Mon Oct 13 12:50:53 2014, 美东)
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'.
1 (共1页)
进入JobHunting版参与讨论
相关主题
有什么网站能练SQL的?问个SQL query
error run SQL query from pyodbc python 3.2.5 (转载)请教SQL Query 面试题
SQL server optimal query design (转载)考大家一道SQL面试题
请帮忙做一个SQL问题公司招聘BI reporting developer
error of sql query in MS Access database请帮忙回答一个SQL问题
Job opening in CT: Software Quality Engineer求助啊,Amazon的software quality engineer的phone interview
请推荐SQL书请教SQL问题
SQL query 求解!【招聘】统计师-上海-全职-互联网广告
相关话题的讨论汇总
话题: year话题: access话题: query话题: int话题: cast