Archives of the TeradataForum
Message Posted: Fri, 21 May 2004 @ 17:19:53 GMT
Subj: | | Re: Character SET Latin vs. Unicode |
|
From: | | Victor Sokovin |
| If you look at the original post, the character column already had a Latin charset. The Unicode was caused by the literal value: all
literal values are treated as UNICODE VARCHARs. | |
| So there's AFAIK no way to switch to Latin without modifying the statement. | |
Dieter, I indeed did not pay much attention to the fact that a literal was used in the original statement.
CREATE SET TABLE vs_test as
(select cast('TESTSTRING' as char(10)) COL_C) with no data ;
produces a Unicode CHAR(10) column as well.
The following two options allow to define COL_C as LATIN:
1. CREATE SET TABLE vs_test as
(select TRANSLATE('TESTSTRING' USING UNICODE_TO_LATIN) COL_C) with no data ;
LATIN CHAR(10)
2. CREATE SET TABLE vs_test as
(select CHAR2HEXINT('TESTSTRING') COL_C) with no data ;
LATIN CHAR(40)
These two forms are of course modifications of the original statement. The only chance is that the CRM tool builds its DDL literally
concatenating whatever strings it gets. Then perhaps the OP could substitute 'TESTSTRING' by something like TRANSLATE('TESTSTRING' USING
UNICODE_TO_LATIN)?
Regards,
Victor
|