DB2 TO ORACLE TIMESTAMP
Moderators: chulett, rschirm, roy
DB2 TO ORACLE TIMESTAMP
Hi,
Can any one help me in converting the db2 timestamp to oracle (ORAOCI9 STAGE) Timestamp.
Can any one help me in converting the db2 timestamp to oracle (ORAOCI9 STAGE) Timestamp.
In the transformer i am keeping db2 datatype as timestamp and in oracle datatype as date.DSguru2B wrote:What happens when you send it directly to oracle without any conversion? Do you get any errors/warnings? If yes, can you paste it here? ...
The format in oracle should be mm/dd/yyyy hh:mi:ss AM/PM
when i ran the job as it is
iam getting the below error
db2cobr_orclcobr_TEST_1..Transformer_1: At row 4, link "DSLink4", while processing column "UPDATE_TS"
Value treated as NULL
Attempt to convert String value "2005-08-12 16:38:55.176710" to Date type unsuccessful
db2cobr_orclcobr_TEST_1..Transformer_1: ORA-01400: cannot insert NULL into ("SUMMARY"."CO_BR_DEP_TEMP_NEW"."UPDATE_TS")
I am getting the following errorchulett wrote:Change the datatype to Timestamp in your job and ensure the stage generates the SQL. Do that, remove the milliseconds and then you'll be fine.
db2cobr_orclcobr_TEST_1..Transformer_1: ORA-01843: not a valid month.
Should i need to edit the sql in the stage?
This is resolved.chulett wrote:No, as a Timestamp with generated SQL there should be no problem if the DB2 timestamp is indeed in the format you say it is.
Post the TO_DATE() portion of your insert sql for this field.
Initially iam using the substring function its not working then i used left function.
Target iam using TIMESTAMP as DATATYPE and it is got resolved.
One more question is how to populate the current date with timestamp as above.