简体   繁体   中英

Insert data to postgres table

I'm Trying to insert the data from csv file which was exported from Oracle DB. when I try to import on PGadmin. its failing with below error.

ERROR: invalid input syntax for type timestamp: "29-APR-18 12.04.07.000000000 AM" CONTEXT: COPY consolidated_dtls_job_log, line 1, column start_time: "29-APR-18 12.04.07.000000000 AM"

Note: Column Start_time is created with timestamp datatype.

Use a different NLS_TIMESTAMP_TZ_FORMAT when exporting the data from Oracle; something that is closer to the ISO format.

Here is an SQL statement provided by Belayer:

ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH:MI:SS.FF TZH:TZM';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM