天天看点

oracle 外部表导入时间戳类型

create table test_ext(

 sdate date,  

 rtime timestamp with time zone,

)

organization external( 

    type oracle_loader

    default directory datadir

    access parameters

    ( 

      records delimited by newline

      fields terminated by ';'

      missing field values are null

   (

  sdate date "YYYY-MM-DD HH24:MI:SS",  

  rtime char(35) date_format TIMESTAMP WITH TIMEZONE mask "YYYY-MM-DD HH.MI.SS.FFTZH"

    )

    location ('test_extra.csv')

parallel 4 reject limit unlimited;

test_extra.csv

2012-04-26;2012-04-27 09:18:00.327238+08

2012-08-02;2012-08-02 12:32:43.271926+08

2012-08-02;2012-08-02 12:33:01.43135+08

2012-08-02;2012-08-02 12:33:06.920191+08

本文转自 pgmia 51CTO博客,原文链接:http://blog.51cto.com/heyiyi/1160416