Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 29 Jun 2006 @ 19:14:31 GMT


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


Subj:   Re: CAST into varchar 2 versions
 
From:   Pandey, Vivek

Hi Michael,

I was thinking why one SQL works while the other doesn't? I even tried doing the TRIM after converting the data type (as you suggested) but that still doesn't explains the behavior. I pasted the explains as I saw some difference in the optimizer plan in the two cases, however that doesn't explains why one case is working while the other is failing!

     sel *
     From tt1,t1
     Where TRIM (tt1.a (varchar(10))) =t1.a;

     CREATE SET TABLE tt1
          (
           a INTEGER,
           b INTEGER)
     UNIQUE PRIMARY INDEX ( a );

     CREATE SET TABLE t1
          (
           a VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
           b CHAR(5) CHARACTER SET UNICODE NOT CASESPECIFIC)
     PRIMARY INDEX ( a );


     sel * From tt1,t1;

          a     b     a     b
          1     1     1     1

Thanks, Vivek



     
  <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