|
Archives of the TeradataForumMessage Posted: Thu, 06 Nov 2003 @ 09:48:52 GMT
Victor, this is just an idea, I have not tested this myself, but thought maybe this would work: Could you have 2 nullable varchar columns, one in Latin, one in Unicode + and indicator column that tells you which of the 2 to use? Then you should be able to build a view like: [...] Case when indicator_column = Unicode then Unicode_text_column when indicator_column = Latin then latin_column (not sure if conversion to Unicode is needed here) [...] Pro: All views that so far went against the table should be more or less easily modifiable to use your new view. You still have only one table, so you don't need a 'union' view (I personally try to avoid union views as much as I can. If you have to go the route of a Union view, I'd carefully study explain before & after to see when the 'where-clause' and other conditions are applied) You only store data in Unicode that requires it. Con: This seems a bit of hack... You still have to adjust the existing code (unless you name the view like the table was named before - even then cast statements of the field might have to be checked...) You need additional storage space for indicator column (unless you use the language column in your example below as indicator ...), as well as for the bits indicating varchar & null. Additional CPU is required when retrieving the data. Just a thought. Unfortunately I don't have time to play with this myself to see if this would work... Mirjam Berger
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||