简体   繁体   English

将数据导入 DB2 数据库时出错

[英]Error while importing data into a DB2 Database

I have tried to load data into DB2 database from csv file.我试图将数据从 csv 文件加载到 DB2 数据库中。

I have used SYSPROC.ADMIN_CMD.我使用过 SYSPROC.ADMIN_CMD。

My csv file我的 csv 文件

11246,209,-1,"VERDE","Prueba","VERDE","MIGRACION","MIGRACION",'2020-05-20 00:00:00','2020-05-20 00:00:00'

I am calling:我打电话给:

CALL SYSPROC.ADMIN_CMD( 'IMPORT FROM "/home/wvillega/Prueba.csv" OF DEL MESSAGES ON SERVER INSERT INTO LEASING.GENCATALOGOS' );

System Returned:系统返回:

IWAQ0003W SQL warnings were found SQLState=01H52 Routine "SYSPROC.ADMIN_CMD" execution has completed, but at least one error, "SQL3015", was encountered during the execution. IWAQ0003W SQL 警告发现 SQLState=01H52 例程“SYSPROC.ADMIN_CMD”执行已完成,但在执行期间至少遇到一个错误“SQL3015”。 More information is available.. SQLCODE=20397, SQLSTATE=01H52, DRIVER=4.19.56更多信息可用.. SQLCODE=20397, SQLSTATE=01H52, DRIVER=4.19.56

IMPORT command using the ADMIN_CMD procedure 使用 ADMIN_CMD 过程的 IMPORT 命令

When you specify MESSAGES ON SERVER, the routine returns a result set described at the link above in the following table:当您指定 MESSAGES ON SERVER 时,例程会返回下表中以上链接中描述的结果集:
Table 1. Result set returned by the IMPORT command表 1. IMPORT 命令返回的结果集
This means, that you should process this result set and use the following columns (there are ready-to-use statements in these columns):这意味着,您应该处理此结果集并使用以下列(这些列中有现成的语句):

  • MSG_RETRIEVAL column to retrieve the corresponding messages MSG_RETRIEVAL 列检索相应的消息
  • MSG_REMOVAL column to remove these messages MSG_REMOVAL 列删除这些消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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