Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Feb 2005 @ 14:16:00 GMT


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


Subj:   Re: Default charset in volatile tables
 
From:   Geoffrey Rommel

  We have noticed that despite all the system defaults being Latin, when creating a volatile table in the following manner the column with the case statement gets created with Unicode character set which causes poor performance in subsequent joins.  


  case when proc_d is null then 'Y' else 'N' end as Null_D  


That's because character *literals* are Unicode by default.

     sel type('Y');

     Type('Y')
     ---------------------------------------
     VARCHAR(1) CHARACTER SET UNICODE

Defining the table first, as you mentioned, is the best workaround. If you really want to use case expressions in your create table statement, you will need to do something like this:

     translate((case ... end) using unicode_to_latin)

-- but that's such a pain.



     
  <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