Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Jun 2006 @ 12:50:47 GMT


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


Subj:   Re: Fast export data file problem
 
From:   Mehra, Tanu

Hi Raghu,

The logic used is, you need to cast the individual columns as CHAR(..) and then all the columns are done a CAST as CHAR(sum of all the data lenghts in the query).

There must be some better way of doing but as of now I am aware of this.

In the eg., that I gave, we first do CAST on col a, and col b and then one CAST AS CHAR(70) on both of these columns, its like

     Select
     CAST
     (
     CAST (a as char(10)) ||'|'||  CAST (b as varchar(60))
     AS CHAR(70))
     from tablename
     ;

And NOT as you had mentioned.

     (CAST (a as char(10))
     ||'|'||  (CAST (CAST (b as varchar(60))) AS CHAR(70))

Also, to change column DBS_Agmt_Hist_Amt, first CAST it AS DATE and then CAST it as CHAR(10).


Regards,

Tanu.



     
  <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