title: How to import data into teradata tables from an excel file using BTEQ import?
body: <p>Im trying to import data into tables from a file using BTEQ import.</p>
  
  <p>im facing weird errors while doing this</p>
  
  <p>Like:</p>
  
  <p>if im using text file as input data file with ',' as delimiter as filed seperator im getting the error as below:</p>
  
  <p>*** Failure 2673 The source parcel length does not match data that was defined.</p>
  
  <p>or</p>
  
  <p>if im using EXCEL file as input data file im getting the error as below:</p>
  
  <p><strong>* Growing Buffer to 53200
  *</strong> Error: Import data size does not agree with byte length.
  The cause may be:
  1) IMPORT DATA vs. IMPORT REPORT
  2) incorrect incoming data
  3) import file has reached end-of-file.
  *** Warning: Out of data.</p>
  
  <p>please help me out by giving the syntax for BTEQ import using txt file as input data file and also the syntax if we use EXCEL file as the input data file</p>
  
  <p>Also is there any specific format for the input data file for correct reading of data from it.
  if so please give me the info about that.</p>
  
  <p>Thanks in advance:)
  <br><br><br></p>
  
  <h2>EDIT</h2>
  
  <p>sorry for not posting the script in first.
  Im new to teradata and yet to explore other tools.
  I was asked to write the script for BTEQ import</p>
  
  <p><b>.LOGON TDPD/XXXXXXX,XXXXXX<br>
  .import VARTEXT ',' FILE = D:\cc\PDATA.TXT <br>
  .QUIET ON <br>
  .REPEAT * <br>
  USING <br> COL1 (VARCHAR(2)) <br> ,COL2 (VARCHAR(1)) <br>,COL3 (VARCHAR(56)) <br> </p>
  
  <p>INSERT INTO  <br> ( COL1 <br>,COL2 <br>,COL3) <br> VALUES ( :COL1 <br>,:COL2 <br>,:COL3); <br>
  .QUIT<br></b>
  I executed the above script and it is successful using a txt(seperating the fileds with comma) file and giving the datatype as varchar.<br></p>
  
  <p>sample input txt file:<br>
  1,b,helloworld1<br>
  2,b,helloworld2<br>
  3,D,helloworld1<br>
  12,b,helloworld1<br></p>
  
  <p>I also tried to do the same using tab(\t) as the field seperator but it giving the same old error.<br>
  Q) Does this work only for comma seperated txt files?<br><br></p>
  
  <p>Please could u tell me where can i find the BTEQ manual...</p>
  
  <p>Thanks a lot</p>