cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle DB, TO_DATE and Stored Procedure

Former Member
0 Kudos

Hi,

I'm trying to insert the following date and time into an oracle DB as part of a stored procedure

'2008-04-17 15:08:06' ..

In my mapping the target field is set to string with the attributes type = DATE and isInput = 1

I have to use the to_date function so I end up with this value....

TO_DATE('2008-04-17 15:08:06', 'YYYY-MM-DD HH24:MI:SS')

In the stored procedure the type is i_IssueDate is Date.

This doesn't work as I get this error: java.lang.NumberFormatException: For input string: "TO_DATE('2008"

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I solved this problem.

I removed the TO_DATE function completely.

I set the attribute type to "TIMESTAMP"

Thats all that is requried!

Former Member
0 Kudos

Hi

Did you chk this blog

BR

Former Member
0 Kudos

I had a look at that blog.

I set the types to string and varchar but then i get this error

ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at line 1

Former Member
0 Kudos

Hi,

Check this thread.

[]

Thanks,

Beena.