Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 03 Dec 2014 @ 10:36:02 GMT


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


Subj:   Do FASTEXPORT work with datatypes data and number?
 
From:   Ganga, Sandeep Kumar

Hi Forum,

I was trying to export the output of a table to file.

The table contains two columns-date_col and key_col.

When tried to export the output shows garbage values, but when tried casting to to_char it works. Do FASTEXPORT work with datatypes date/number or did i miss anything here?

     show table dbc1.testdate;

     CREATE SET TABLE dbc1.testdate ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT,
         DEFAULT MERGEBLOCKRATIO
          (
           date_col DATE FORMAT 'YY/MM/DD',
           key_col NUMBER)
     PRIMARY INDEX ( date_col );

     ##
     sel * from dbc1.testdate;

     date_col                                   key_col
     --------  ----------------------------------------
     01/03/30      3 01/01/10                      1
     20/02/02     50 01/02/20                      2

     ##
     # cat fs.fxp
     .LOGTABLE utillog ;
     .logon client05/dbc1,dbc1;
     .BEGIN EXPORT
     SESSIONS 2;
     .EXPORT OUTFILE ttyyuueerr;
     sel * from dbc1.testdate;
     .END EXPORT;
     .LOGOFF;

     ##AFTER SCRIPT RAN
     ## cat ttyyuueerr
             �
             �i
             JP��
             ,j
     ##CONVERTED DATATYPE DATE TO CHAR
     #cat fs.fxp
     .LOGTABLE utillog ;
     .logon client05/dbc1,dbc1;
     .BEGIN EXPORT
     SESSIONS 2;
     .EXPORT OUTFILE ttyyuueerr;
     select to_char(date_col,'DD/MM/YYYY'),to_char(key_col) from  dbc1.testdate; .END EXPORT; .LOGOFF;

     ##AFTER SCRIPT RAN
     ## cat ttyyuueerr
     30/03/30013
     10/01/20011
     02/02/202050
     20/02/20012

Thanks in advance,


Regards,

sandeep.

GANGA SANDEEP KUMAR



     
  <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