[db2inst1@localhost ~]$ db2 "import from /home/db2inst1/haton/scrcfile/tmp/input/crm/20110323/ECIF_CORP_CBI_20110323.LDF of del modified by TIMESTAMPFORMAT="yyyy-mm-dd hh:mm:ss tt" commitcount=50000 restartcount=0 INSERT INTO DB2INST1.TM_TB_CORP_BASIC_INFO(SEQUENCE_NO, PARTY_ID, ORG_CODE, CUST_INSTN_TYPE, ORG_CODE_DATE, ORG_CODE_DEPART, LOAN_CARD_CODE, LOAN_CARD_DATE, LEGAL_CERT_TYPE, LEGAL_CERT_NO, LEGAL_CERT_NAME, LEGAL_CERT_CONTACT_TYPE, BULID_DATE, BASIC_ACCOUNT_OPEN_BANK, BASIC_ACCOUNT_NO, BASIC_ACCOUNT_ALLOW_NO, OPEN_ACCOUNT_ALLOW_NO, BASIC_ACCOUNT_STATUS, CHARGE_DEPART, COUNTRY, OPEN_DATE, CREATE_INSTN, IS_GROUP, IS_SUPERIOR_COM, SUPER_ORG_CODE, SUPER_LOAN_CODE, MARKET_CORP_FLAG, VIP_CUST_LEVEL, MARKET_ADDRESS, MARKET_STOCK_CODE, CUST_SORT, CUST_STATUS, MARKE, CREATED_TS, UPDATED_TELLER_ID, UPDATED_TS, CREATE_SYSTEM_ID, SRC_CRTD_TS, SRC_UPTD_TS, UPDATE_SYSTEM_ID) "
SQL3192N In the filetmod a user specified format "TIMESTAMPFORMAT" beginning
with the string "yyyy-mm-dd" is not valid.
这里我是想加timestamp类型转换的,问题这里说无效字符了,语法有什么问题吗,请指教
------解决方案--------------------------------------------------------
TIMESTAMPFORMAT="yyyy-mm-dd hh:mm:ss tt"
能不能写成 to_date?呵呵 我猜的 再帮你顶
------解决方案--------------------------------------------------------
注意转义,否则 对于DB2命令来说,成对的引号匹配已经完成。红色部分已经是一个完整的字符串了。
db2 "import from /home/db2inst1/haton/scrcfile/tmp/input/crm/20110323/ECIF_CORP_CBI_20110323.LDF of del modified by TIMESTAMPFORMAT="yyyy-mm-dd hh:mm:ss tt" commitcount=50000 restartcount=0 INSERT INTO DB2INST1.TM_TB_CORP_BASIC_INFO(SEQUENCE_NO, PARTY_ID, ORG_CODE, CUST_INSTN_TYPE, ORG_CODE_DATE, ORG_CODE_DEPART, LOAN_CARD_CODE, LOAN_CARD_DATE, LEGAL_CERT_TYPE, LEGAL_CERT_NO, LEGAL_CERT_NAME, LEGAL_CERT_CONTACT_TYPE, BULID_DATE, BASIC_ACCOUNT_OPEN_BANK, BASIC_ACCOUNT_NO, BASIC_ACCOUNT_ALLOW_NO, OPEN_ACCOUNT_ALLOW_NO, BASIC_ACCOUNT_STATUS, CHARGE_DEPART, COUNTRY, OPEN_DATE, CREATE_INSTN, IS_GROUP, IS_SUPERIOR_COM, SUPER_ORG_CODE, SUPER_LOAN_CODE, MARKET_CORP_FLAG, VIP_CUST_LEVEL, MARKET_ADDRESS, MARKET_STOCK_CODE, CUST_SORT, CUST_STATUS, MARKE, CREATED_TS, UPDATED_TELLER_ID, UPDATED_TS, CREATE_SYSTEM_ID, SRC_CRTD_TS, SRC_UPTD_TS, UPDATE_SYSTEM_ID) "
------解决方案--------------------------------------------------------
试试
db2 "import from /home/db2inst1/haton/scrcfile/tmp/input/crm/20110323/ECIF_CORP_CBI_20110323.LDF of del modified by TIMESTAMPFORMAT='yyyy-mm-dd hh:mm:ss tt'
....
db2 "import from /home/db2inst1/haton/scrcfile/tmp/input/crm/20110323/ECIF_CORP_CBI_20110323.LDF of del modified by TIMESTAMPFORMAT=\"yyyy-mm-dd hh:mm:ss tt\"
....