Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 08 Apr 2004 @ 21:14:26 GMT


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


Subj:   Re: Variable length extract with fastexport
 
From:   Christian Schiefer, makeITdone

Hi,

1.) Concatenate all your columns in your fastexport script to make it one string: e.g.

     select col1 || ',' ||
          col2 || ',' ||
          col3 || ','
     from table;

2.) I wrote a small C-program, which is removing the 2 length indicator bytes for the record length.

Just compile it and use it like:

     cat .txt | myprogram > .txt

     ----------------------------------Begin program -------------------------------
     #include 

     main( int argc, char **argv )
     {
             int i, j;

             while ( ( j = getchar( ) ) !=  EOF && ( i = getchar( ) ) != EOF )
                     for ( i = ( i << 8 ) + j + 1; i--; putchar( getchar( ) ) );
     }
     ----------------------------------End program ---------------------------------

Greetings

Christian



     
  <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: 27 Dec 2016