我在CLPPlus和IMPORT命令方面遇到了新问题。
我尝试将数据导入到名称中包含空格的表中,但似乎失败了:
SQL> IMPORT FROM '/home/i1058/outfile' INSERT INTO USER1."TABLE 1";
Invalid Syntax Error
SQL> IMPORT FROM '/home/i1058/outfile' INSERT INTO USER1.'TABLE 1';
Invalid Syntax Error
我尝试过很多东西,但总是失败。
当然,我也尝试过使用CLP的'经典'LOAD,它完美无缺:
db2 'LOAD FROM "outfile" OF DEL MODIFIED BY CODEPAGE=1208 NOCHARDEL INSERT INTO "USER1"."TABLE 1"'
...
Number of rows read = 3
Number of rows skipped = 0
Number of rows loaded = 3
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 3
有什么想法吗?
谢谢和问候
答案 0 :(得分:0)
以下是我的10.5系统的工作原理:
SQL> create table "TEST TBL" (f1 int);
DB250000I: The command completed successfully.
SQL> IMPORT FROM '/tmp/dat' of del insert into "TEST TBL";
Total number of rows read : 6
Total number of rows skipped : 0
Total number of rows inserted : 6
Total number of rows updated : 0
Total number of rows rejected : 0
Total number of rows committed : 6
DB250000I: The command completed successfully.
SQL> IMPORT FROM '/tmp/dat' insert into "TEST TBL";
Invalid Syntax Error
看起来文档有错误,因为它没有显示CLPPlus import
命令的文件类型选项。