[resolved] Insert Date into Oracle DB (Date column)

One Star

[resolved] Insert Date into Oracle DB (Date column)

Hi,
How to insert into a Oracle DB column that only supports Date type, using a tOracleRow component, a date in the format yyyy/mm/dd HH:mm:ss ? I may have already the Date in Talend Date format, or I may have a String (it's indifferent).
Thanks

Accepted Solutions
One Star

Re: [resolved] Insert Date into Oracle DB (Date column)

Hi,
I've solved it with: TO_DATE('20140211093358', 'YYYYMMDDHH24MISS') , like I found it's done in Oracle sql language.

All Replies
Seventeen Stars

Re: [resolved] Insert Date into Oracle DB (Date column)

The Talend Date format is exactly the Java Date format and the tOracleOutput component takes that as Date. Oracle DATE type also stores the time unlike other database which truncates the time in DATE typed columns.
One Star

Re: [resolved] Insert Date into Oracle DB (Date column)

Hi,
I've solved it with: TO_DATE('20140211093358', 'YYYYMMDDHH24MISS') , like I found it's done in Oracle sql language.
Seventeen Stars

Re: [resolved] Insert Date into Oracle DB (Date column)

You can do this but you lose the possibility to check the input data for correct format and create rejects and helpful log outputs.