当我运行下面的查询时,我收到错误“数据类型不匹配n#39;
”SELECT o.name as Name,
Month(CDate(type.Value)) as ValueType
FROM (t_obj as o
INNER JOIN t_prop as type
ON o.Obj_ID = type.Obj_ID)
WHERE type.Property LIKE 'Tech*'
AND Month(type.Value) = 5
但是如果我按如下方式运行查询,它就可以正常运行
SELECT o.name as Name,
Month(CDate(type.Value)) as ValueType
FROM (t_obj as o
INNER JOIN t_prop as type
ON o.Obj_ID = type.Obj_ID)
WHERE type.Property LIKE 'Tech*'
答案 0 :(得分:2)
AND Month(type.Value) = 5
要
AND Month(CDate(type.Value)) = 5