0

我对 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 的“经典”加载,并且效果很好:

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

有任何想法吗 ?

谢谢并恭祝安康

4

1 回答 1

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

看起来文档有一个错误,因为它没有显示 CLPPlusimport命令的文件类型选项。

于 2017-02-02T14:56:44.177 回答