I try to execute the following query using java.sql.PreparedStatement:
SELECT NVL (tb.ddate, '2002-10-15')
FROM tb
But get this error:
java.sql.SQLException: ORA-01843: ¿¿¿¿ ¿¿ ¿¿¿
What is wrong?
-
1Wrong date format? Month is usually in JAN, FAB or like thatBhrugesh Patel– Bhrugesh Patel2012年02月28日 20:44:15 +00:00Commented Feb 28, 2012 at 20:44
-
@BhrugeshPatel: that is absolutely perfect date format. (October, 15th, 2002)user330315– user3303152012年02月28日 21:56:50 +00:00Commented Feb 28, 2012 at 21:56
1 Answer 1
The date is not in expected format.
See http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams122.htm
Or try:
SELECT NVL (tb.ddate, to_date('2002-10-15', 'YYYY-MM-DD') )
FROM tb
answered Feb 28, 2012 at 20:43
dani herrera
52.1k11 gold badges133 silver badges188 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default