|
|
Archives of the TeradataForum
Message Posted: Thu, 29 Jun 2006 @ 19:14:31 GMT
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
| |