Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 May 2005 @ 09:38:48 GMT


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


Subj:   Generating the Header and Trailer in the Data File
 
From:   kumar28

Hi,

I am generating a comma delimited file using FastExport. The file is getting generated fine with data. I need to have a header(column names) as a first line of the file followed by data and then I need to have a row count at the last line of the data file. I am on windows environment.Is there a sample code I can look into. I will really appreciate any guidance in this regard.

Below is my sample script:

     .LOGTABLE retail.empdept_fexp;
     .LOGON ..........
     .BEGIN EXPORT
            SESSIONS 20;
     .EXPORT OUTFILE C:\myarea\FEXP\retail_empdept
       FORMAT TEXT mode record;

     select
     cast(deptno as char(3))
            ||','||
            cast(empno as char(10))
            ||','||
            cast(ename as char(10)) (char(23))
      from retail.empdept1

     where......
     join conditions.....;

     .END export;
     .LOGOFF;

Thanks

Raj



     
  <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