Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Feb 2011 @ 15:24:09 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Bteq and Mload script errors
 
From:   Shindhe, Naveen

Hi Guys,

Iam loading flat file into teradata tables for both BTEQ and Mload, getting some errors.

1. BTEQ Issue

     Source1.txt
     11111111 RAJA
     33333333 KUMAR
     44444444 ANAND

     MyScript.txt
     .logon Database/userid, pwd
     .IMPORT REPORT FILE = c:\bteq\source1.txt
     .quiet on
     .repeat*
     using COL1 (INTEGER), COL2 (VARCHAR(12))
     insert into Database.tablename (customer_number,NAME)
     values                     (:col1,:col2);
     .quit

Guys,

I am getting the below error.

     *** Failure 2673 The source parcel length does not match data that was defined.

If I remove col2 its working fine, any idea why its giving above error.


2. Mload Issue

     Source.txt
     ID,CUST_ID,CUST_NAME,CUST_GROUP,CUST_SEGMENT,CUST_COUNTRY_ID
     1,R001UK,Adam Smith,Individual,Retail,UK
     2,R001UK,John Adams,Individual,Retail,USA
     3,R001UK,Mark Smith,Individual,Retail,PL

     MyScript.txt
     .logtable customer_service.dwlogtable;
     .logon demotdat/dbc,dbc;
     .begin mload tables customer_Feb04_Mload;
     .layout custlayout;
             .field ID               1 INTEGER;
             .field CUST_ID          * VARCHAR(6);
             .field CUST_NAME        * VARCHAR(30);
             .field CUST_GROUP       * VARCHAR(30);
             .field CUST_SEGMENT     * VARCHAR(10);
             .field CUST_COUNTRY_ID  * VARCHAR(3);

     .dml label custdml;
     insert into customer_service.customer_Feb04_Mload.*;
     .import infile C:\Bteq\Source.txt
     format vartext ','
     layout custlayout
     apply custdml;
     .end mload;
     .logoff;

I am getting the below error.

     **** 20:08:18 UTY1419 The field type for field ID is not allowed
          when using the VARTEXT record format.

Any changes should I do for the above 2 scirpts.

Any help will be appreciated.


Thanks,

Naveen



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016