Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 05 Mar 2001 @ 16:43:38 GMT


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


Subj:   Re: FastExport Output Formatting
 
From:   Glenn McCall

Hi Yvonne,

I have not done exactly what you are asking, but I imagine that something like this would work. the table header_table is a table with exactly one row in it.

Alternatively, if you didn't want to use the header_table, then you could simply attach the header from another file. In unix you could use cat (eg cat header.txt /tmp/test.txt > file_to_send)


Hope this helps

Glenn McCall

     .LOGTABLE some_log_table;
     .logon uid,pwd;
     .BEGIN EXPORT SESSIONS 4;

     .EXPORT MODE RECORD OUTFILE /tmp/test.txt
                     FORMAT FASTLOAD;

     select 'headerinfo' from header_table;
     select col1 , '|', col2 '|'
     from some_table_to_export

     .END EXPORT;
     .LOGOFF;

-or-

     .LOGTABLE some_log_table;
     .logon uid,pwd;
     .BEGIN EXPORT SESSIONS 4;

     .EXPORT MODE RECORD OUTFILE /tmp/test.txt
                     FORMAT FASTLOAD;

     select * from header_table;
     select col1 , '|', col2 '|'
     from some_table_to_export

     .END EXPORT;
     .LOGOFF;

-or-

     .LOGTABLE some_log_table;
     .logon uid,pwd;
     .BEGIN EXPORT SESSIONS 4;

     .EXPORT MODE RECORD OUTFILE /tmp/test.txt
                     FORMAT FASTLOAD;

     select 'hdr1' (char(10), 'hdr2' (char4) from header_table;
     select col1 (char(10)) , '|', col2 (char(4) '|'
     from some_table_to_export

     .END EXPORT;
     .LOGOFF;


     
  <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