on 06-10-2008 10:30 AM
Hi ALL,
i am getting this error while sending data to an Oracle database.
java.sql.SQLException: ORA-01861: literal does not match format string
i have used to_date function in my mapping and I dont see any issue with that. Can it be due to some fields exceeding the length assigned to them in the database?
Please help me to resolve this issue.
Thanks n Regards
Pushpinder Kaur
I met the same problem.The solution is following:
/people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database
Rewards points if it is helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pushpinder,
Please paste the SQL statement that you have constructed.
Regards,
Shamly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You tried to enter a literal with a format string, but the length of the format string was not the same length as the literal.
The options to resolve this Oracle error are:
Re-enter the literal so that it matches the format string.
For example, if you tried to execute the following statement:
SELECT to_date('20041308','yyyy/mm/dd')
FROM dual;
You will receive the error u getting.
You could correct the SQL statement as follows:
SELECT to_date('2004/08/13','yyyy/mm/dd')
FROM dual;
As a general rule, if you are using the to_date, to_timestamp, to_char, and similar functions, make sure that the literal that you provide matches the format string that you've specified.
hope this will help you.
Regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove 24.
TO_DATE('2007-06-01 00:00:00','yyyy-mm-dd HH:MI:SS')
http://www.techonthenet.com/oracle/errors/ora01861.php
http://www.techonthenet.com/oracle/functions/to_timestamp.php
hi
try to create working sql query directly in oracle first.
then try to map you mesage to form of this sql query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.