SELECT
R.FDateTime,
R.FValue,
T.FTargetDefCode
FROM
TABLE_RUNTIMEDATA R,
TABLE_TARGET T
WHERE
T.FTargetCode=r.FTargetCode
and substr(To_char(To_Date(R.FDateTime,'yyyy-mm-dd hh24:mi:Ss')),1,4)='2007'
and FStatRangeCode='D' and FBizTypeCode='A'
ORDER BY R.FDateTime报错 文字与格式字符串不匹配
如果把'yyyy-mm-dd hh24:mi:Ss'换成'yyyymmdd'则报无效的月份
高手给解答一下吧
R.FDateTime,
R.FValue,
T.FTargetDefCode
FROM
TABLE_RUNTIMEDATA R,
TABLE_TARGET T
WHERE
T.FTargetCode=r.FTargetCode
and substr(To_char(To_Date(R.FDateTime,'yyyy-mm-dd hh24:mi:Ss')),1,4)='2007'
and FStatRangeCode='D' and FBizTypeCode='A'
ORDER BY R.FDateTime报错 文字与格式字符串不匹配
如果把'yyyy-mm-dd hh24:mi:Ss'换成'yyyymmdd'则报无效的月份
高手给解答一下吧
可以不
-----------------------
2007---------------
为什么不这么取年份?