All Forums General
lpandu 3 posts Joined 10/14
14 Oct 2014
Logan- Unable to import text file into a table using Import in BTEQ

All,
Logan here, Please help me on below.

Am trying to import a text file(not csv) using import in Teradata 14.10(BTEQ)

But, am facing below error.

 *** Failure 2673 The source parcel length does not match data that was defi
 ned.
                Statement# 1, Info =1
 *** Total elapsed time was 1 second.

My import.sql file contains,

-------------------------------

.logon tdserver/tduser,pwd

.import VARTEXT ',' file='file_path' skip=2
.repeat *
    using empno(varchar(4)),ename(varchar(6))
    insert into temp_logan_2(empno,ename) values(:empno,:ename);

.logoff
.exit

and,my text file contains,

--------------------------------

 empno  ename       job                mgr  hiredate        sal       comm  deptno
-----------  ----------  ---------  -----------  --------  ---------  ---------  ------
       7788  SCOTT       ANALYST           7566  82/12/09    3000.00          ?      20
       7782  CLARK       MANAGER           7839  81/06/09    2450.00          ?      10
       7521  WARD        SALESMAN          7698  81/02/22    1250.00     500.00      30
       7698  BLAKE       MANAGER           7839  81/05/01    2850.00          ?      30
       7902  FORD        ANALYST           7566  81/12/03    3000.00          ?      10
       7839  KING        PRESIDENT            ?  81/11/17    5000.00          ?      10
       7900  JAMES       CLERK             7698  81/12/03     950.00          ?      30
       7654  MARTIN      SALESMAN          7698  81/09/28    1250.00    1400.00      30
       7934  MILLER      CLERK             7782  82/01/23    1300.00          ?      10
       7566  JONES       MANAGER           7839  81/04/02    2975.00          ?      20
       7844  TURNER      SALESMAN          7698  81/10/08    1500.00          ?      30
       7499  ALLEN       SALESMAN          7698  81/02/20    1600.00     300.00      30
       7369  SMITH       CLERK             7902  80/12/17     800.00          ?      20
       7876  ADAMS       CLERK             7788  83/01/12    1100.00          ?      20

Please help to import above data into Teradata table using import function in BTEQ...

Regards,
Logan

lpandu 3 posts Joined 10/14
14 Oct 2014

Kindly share the clear snap hence i am completely new to Teradata...

Raja_KT 1246 posts Joined 07/09
15 Oct 2014

check your data n script. delimited .....
fieldwidths look okay.

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.