Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 23 Aug 2012 @ 09:37:04 GMT


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


Subj:   Re: BTEQ EXPORT FILES
 
From:   Wani, Vinay

Hi,

Following shell script may be helpful for you,

Shell Script:-

     Filename=Output`date "+%Y%m%d"`.csv
     sed 's/\&File_Name/'$Filename'/g' < Bteq_dynamic_name.btq | bteq

The Bteq script,

     .logon ***/***,***
     .EXPORT REPORT File=&File_Name
     .separator '|'
     select col1,col2  from Table1;
     .export reset
     .quit

Run the shell script, it will create output file Output20120823.csv(Today's date appended after word Output).


Regards,

Vinay



     
  <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