0

我已经为具有多于一列的表完成了快速加载(我使用带有分隔符的 vartext 格式进行了此操作,)。

现在我想加载一个只有一列(要说 5 行)的文件。但我无法做到这一点并遇到以下错误:

I/O Error on File Read: 16, Text: Unexpected data format

我的快速加载脚本如下:

SESSIONS 5;

.LOGON dbc/dbc.dbc;
BEGIN LOADING MYTABLE
ERRORFILES
TABLE_FLET,
TABLE_FLUV ;

DEFINE
COL1_MYTABLE (CHAR(2))
FILE = C:\Fload\INPT.TXT;

INSERT INTO MYTABLE
(
COL1_MYTABLE
)
VALUES
(
:COL1_MYTABLE
);

END LOADING;

MyTable 结构如下:

CREATE MULTISET TABLE database.MYTABLE ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL,
     CHECKSUM = DEFAULT
     (
      COL1_MYTABLE CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC
      )
      PRIMARY INDEX ( COL1_MYTABLE );

输入文件的内容如下:

AA
BB
CC
DD  
EE

我该如何做这个快速加载?

4

1 回答 1

2

完成..使用以下脚本:

.LOGON DBC/DBC,DBC;

CREATE MULTISET TABLE DATABASE.MYTABLE ,NO FALLBACK ,  
     NO BEFORE JOURNAL,  
     NO AFTER JOURNAL,  
     CHECKSUM = DEFAULT  
     (  
      COL1_MYTABLE CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC)  
PRIMARY INDEX ( COL1_MYTABLE );  


BEGIN LOADING MYTABLE  
ERRORFILES  
        TABLE_FLET,  
        TABLE_FLUV  
;  

<b>SET RECORD TEXT;  </b>  
DEFINE  
COL1_MYTABLE (CHAR(2))  
FILE = C:\Fload\INPT.TXT;  

SHOW;  
INSERT INTO MYTABLE  
(  
COL1_MYTABLE  
)  
VALUES  
(  
:COL1_MYTABLE  
);  

END LOADING;
于 2010-12-02T08:46:13.617 回答