I want to map a datetime mm/dd/yyyy hh24:mi:ss attribute in flatfile to Teradata table date yyyy-mm-dd attribute using informatica.

When I added to_date(date_field, 'yyyy-mm-dd') I'm encountering oracle fatal error. When I tried with to_date(to_char(date_field, 'yyyy-mm-dd')) it is giving invalid string input to to_date().

Can anyone help?

有帮助吗?

解决方案

In Informatica, the format that you specify under to_date() function should be same as your source data format and not your target format.

So in your case, to_date function should be like this:

to_date (date_field, 'mm/dd/yyyy hh24:mi:ss')

This is because your flat file date has a format of mm/dd/yyyy hh24:mi:ss (Ensure that all the records in this column in your flat file date are really in this format - else you will encounter error)

Do not worry about target date format as long as the target column is a date datatype. By nature, date datatype does not have a format, it's only the display that needs format.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top