Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 May 2008 @ 20:41:20 GMT


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


Subj:   Getting column headers in Fast Export
 
From:   Peter Shvets

Hello all,

Thanks a lot Teradata gurus for all your help dealing with Teradata!

I am having trouble extractign column headers as a first row into a flat file.

Could someone suggest the right command. Fast Export manual doesn't seem to have this info.

Here is my fexp script:

     .LOGTABLE db.fexp_tbl ;
     .LOGON p/p, password;
     DATABASE db ;

     .BEGIN EXPORT SESSIONS 12;
     /* identify the destination file for exported data */
     .EXPORT OUTFILE load_file_R.txt
        MODE RECORD FORMAT TEXT;
     SELECT
     cast( coalesce(month_yyyymm  , 'blank' ) AS CHAR(7)) AS month_yyyymm
     ,'|' (CHAR(1))
     ,cast( coalesce(buyer_verified   , 'blank' ) AS CHAR(15)) AS buyer_verified
     ,'|' (CHAR(1))
     ,cast( coalesce(seller_verified  , 'blank' ) AS CHAR(15)) AS seller_verified
     from db.tbl1

     .END EXPORT ;
     .LOGOFF;
     .EXIT;

I need month_yyyymm, buyer_verified, seller_verified to show up as a first row in my extract file.


Thanks a lot for help!

Peter.



     
  <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