Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 08 Oct 2009 @ 20:02:26 GMT


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


Subj:   Re: FASTEXPORT varchar TERADATA
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, October 08, 2009 15:47 -->

Unless I'm missing something the easiest way is to work out the maximum posisble length of the record and cast the result accordingly.

The OS should just ignore any trailing spaces

For example

     SELECT
     CAST (
     (TRIM(TBL.TABLE_NAME_LN) || ';' ||
     TRIM(FLD.FIELD_NAME_LN) || ';' ||
     TRIM(FLD.FIELD_ID (INTEGER)) || ';' ||
     TRIM(FLD.FIELD_TYPE_DS )) as Char(100))

     FROM PAC_R_DF_DICO_F FLD
     INNER JOIN PAC_R_DF_DICO_T TBL
     ON FLD.TABLE_ID = TBL.TABLE_ID
     ORDER BY TBL.TABLE_ID, FLD.FIELD_ID;

cheers



     
  <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