Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 27 Apr 2007 @ 18:42:09 GMT


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


Subj:   Re: SQL Assistant - Export Results
 
From:   Bob Widman

The most successful approach was concatenating trimmed columns as a single column, changing the tab to a vertical bar, and losing the requirement for a header row. The resulting run file looked similar to the following:

     .logon uid,pwd
     .set width 160
     .set titledashes off
     .set format off
     .export report file=c:\export\exportfile.txt
     select
        trim(tbl_a_smallint1) || '|' ||
        trim(tbl_a_date1) || '|' ||
        trim(tbl_a_char1) || '|' ||
        trim(sum(tbl_a_int1 - tbl_a_int2)) || '|' ||
        trim(tbl_a_decimal1 (format 'ZZZZZ9.99'))
     from
        edw_tbls.tbl_a
     group by
        tbl_a_smallint1,
        tbl_a_date1,
        tbl_a_char1,
        tbl_a_decimal1
     order by
        tbl_a_smallint1,
        tbl_a_date1,
        tbl_a_char1
     ;
     .quit

Thanks for the hints.



     
  <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