Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Oct 2002 @ 19:45:38 GMT


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


Subj:   Re: Producing large extract files
 
From:   Linda Borushko

This fastexport runs on win NT and produces a fixed length flat file. Note that all fields must be converted to char and given a size.

/*--------------------------------------------------------------------
     EXTRACT NEW RECORDS FROM THE TABLE
+ ------------------------------------------------------------------*/
.LOGTABLE dbname.EXP_LOG
;
DATABASE  dbname ;
.BEGIN EXPORT SESSIONS 16
;
.EXPORT OUTFILE l:\outputfile.txt
   FORMAT TEXT
   MODE RECORD
;

SELECT  A.F1             (CHAR (09))
       ,A.F2                        (CHAR (06))
       ,A.F3                        (CHAR (30))
       ,A.F4                        (CHAR (30))
       ,A.F5_DATE         (CHAR (08))
       ,A.F6_DATE         (CHAR (08))
FROM dbname.tablename1 A
WHERE A.STORED_ON_TABLE_DT >
  (SELECT MAX(B.STORED_ON_TABLE_DT)
   FROM dbname.tablename2 B)
;
.END EXPORT;
;


     
  <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: 15 Jun 2023