All Forums Tools
kapil 8 posts Joined 02/09
20 Jul 2009
Getting error in fastload

Hi guys,I really need your help.Here is fexp script am using to export 4 columns data in fastload mode..LOGTABLE RETAIL.FEXP_LOG;.LOGON ***/******;.BEGIN EXPORT;.EXPORT OUTFILE C:\emp1.txt MODE RECORD FORMAT fastload;SELECT trim(EmpNo (VARCHAR(15))), trim(Name (VARCHAR(18))), trim(DeptNo (SMALLINT)), trim(Salary (DECIMAL(8,2)))FROM RETAIL.EMP;.END EXPORT;.LOGOFF;and this same exported data i m fastloading to a table....here is my fastload script.LOGON ***/******;DROP TABLE RETAIL.EMP2;DROP TABLE RETAIL.ET_EMP2;DROP TABLE RETAIL.UV_EMP2;CT RETAIL.EMP2 ( EMPNO VARCHAR(15), NAME VARCHAR(18), DEPTNO SMALLINT, SALARY DECIMAL(8,2) ) PRIMARY INDEX ( EMPNO );DEFINE EmpNo (VARCHAR(15)), Name (VARCHAR(18)), DeptNo (SMALLINT), Salary (DECIMAL(8,2)) FILE = c:\emp1.txt;BEGIN LOADING retail.emp2 ERRORFILES RETAIL.ET_EMP2,RETAIL.UV_EMP2 CHECKPOINT 100;INSERT INTO retail.emp2 VALUES(:EmpNo,:Name,:DeptNo,:Salary); END LOADING; LOGOFF;while executing fastload script i am getting following error..--Record is too long by 10 byte(s).-- Possible case : Variable size field may not contain 2-byte or 2-byte length may be invalid.but how an error can come coz both table has same ddl ,everything same.Plz suggest something...thanks and Regards,kapil

Thanks and Regards, Kapil

Fred 1096 posts Joined 08/04
24 Jul 2009

TRIM function returns VARCHAR.First choice: remove TRIM from the non-character fields in FastExport step.Second choice: change DEFINE in FastLoad to VARCHAR for those fields.

You must sign in to leave a comment.