我需要显示日期20141211到20141214的数据。但是有一个错误。
SELECT *
FROM ORDERS
WHERE ORDER_DATE >= '20141211'
AND ORDER_DATE < '20141214'
但似乎不起作用
"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."
20141211到20141214之间数据的过滤器详细信息。
1条答案
按热度按时间dly7yett1#
错误是抱怨日期文字。使用有效的Oracle文字,您的查询应该可以工作: