时间:2021-07-01 10:21:17 帮助过:2人阅读
mysql -h172.166.230.229 -uread -p -Ne "use gguser; select* from gg_user;" > /tmp/test.sql
load data CHARACTERSET ‘UTF8‘ infile ‘/tmp/test.sql‘ replace into table PALACE.GG_USER fields terminated by X‘09‘ optionally enclosed by ‘"‘ (USERID NULLIF(USERID=‘NULL‘) ,ISPART NULLIF(ISPART=‘NULL‘) ,ACTUALPOSITIONID NULLIF(ACTUALPOSITIONID=‘NULL‘) ,BEGINWORKTIME timestamp "yyyy-mm-dd" NULLIF(BEGINWORKTIME=‘NULL‘) ,BIRTHDAY timestamp "yyyy-mm-dd" NULLIF(BIRTHDAY=‘NULL‘) ,CARDNO NULLIF(CARDNO=‘NULL‘) ,EMAIL NULLIF(EMAIL=‘NULL‘) ,GENDERID NULLIF(GENDERID=‘NULL‘) ,HEALTHID NULLIF(HEALTHID=‘NULL‘) ,HOME NULLIF(HOME=‘NULL‘) ,IDENTIFY NULLIF(IDENTIFY=‘NULL‘) ,LEAVEREASONID NULLIF(LEAVEREASONID=‘NULL‘) ,LEAVETIME timestamp "yyyy-mm-dd" NULLIF(LEAVETIME=‘NULL‘) ,MOBILEPHONE NULLIF(MOBILEPHONE=‘NULL‘) ,OFFICE NULLIF(OFFICE=‘NULL‘) ,ORGID NULLIF(ORGID=‘NULL‘) ,ORGNAME NULLIF(ORGNAME=‘NULL‘) ,PASSWORD NULLIF(PASSWORD=‘NULL‘) ,POSITIONID NULLIF(POSITIONID=‘NULL‘) ,REACHTIME timestamp "yyyy-mm-dd" NULLIF(REACHTIME=‘NULL‘) ,SORTSNO NULLIF(SORTSNO=‘NULL‘) ,USERIMG NULLIF(USERIMG=‘NULL‘) ,USERNAME NULLIF(USERNAME=‘NULL‘) ,WORKSTATUSID NULLIF(WORKSTATUSID=‘NULL‘) ,STATUS NULLIF(STATUS=‘NULL‘) ,CERTYPEID NULLIF(CERTYPEID=‘NULL‘) ,MINZUID NULLIF(MINZUID=‘NULL‘) ,PERSONID NULLIF(PERSONID=‘NULL‘))
./sqlldr userid=‘username/pwd‘ control=‘/tmp/ctl.ctl‘ log=‘/tmp/ctl.log‘
mysql导入数据到oracle中
标签: