Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 02 Feb 2009 @ 16:37:02 GMT


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


Subj:   Regarding Bteq Scripts
 
From:   Dharmawat, Rahul

Hi

I was trying to export the records by the below script. Records are successfully exported in a file.

When I was trying to import the records, it is not giving me any error but records are not loaded in a table.

Request to all of you please let me know the error.

     rm -f test_exp.dat

     TMP_FILE=/home/smithsag/teradata_tut
        bteq< 0 THEN .quit 8;
       .set titledashes off;
           .set titles off;
           .set width 254;
                   .export  FILE=${TMP_FILE}/test_exp.dat
              select empno,empname from work_db.employee;
                    .export reset;
                    .IF ERRORCODE <> 0 THEN .quit 8;
                    .quit 0;
     EOF1

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

     TMP_FILE=/home/smithsag/teradata_tut
     bteq< 0 THEN .quit 8;
                   .import REPORT FILE=${TMP_FILE}/test_exp.dat
                  .quiet on
                  .repeat *
              USING             in_empno      (INTEGER)
                              , in_empnm      (CHAR(8))
              INSERT INTO     work_db.employee
                       (empno,empname)
             VALUES   (        :in_empno
                             , :in_empnm)
              ;
                   .IF ERRORCODE <> 0 THEN .quit 8;
                   .quit 0;
     EOF1


     
  <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