【发布时间】:2016-03-04 01:04:54
【问题描述】:
我的一张桌子上有时间戳 (05-DEC-15 03.48.57.061000000 PM)。我想比较这个时间戳来检索数据。我写了以下查询
select * from ACTIVATIONRECORDS
WHERE ACTIVATIONDATE =
TO_DATE('04-12-15 03.48.57.052000000 PM','DD-MM-YY HH.MI.SS.SSSSS PM');
但它因以下错误而失败
ORA-01861: literal does not match format string
01861. 00000 - "literal does not match format string"
*Cause: Literals in the input must be the same length as literals in
the format string (with the exception of leading whitespace). If the
"FX" modifier has been toggled on, the literal must match exactly,
with no extra whitespace.
*Action: Correct the format string to match the literal.
【问题讨论】:
-
TO_DATE('04-12-15 03.48.57.052000000 PM','DD-MM-YY HH.MI.SS.SSSSSSSSS PM');?
标签: sql oracle oracle10g oracle-sqldeveloper