upgrading table/varchar columns definition from latin to unicode - content representation

Database
jld
N/A

upgrading table/varchar columns definition from latin to unicode - content representation

Hi there,

I am planning to upgrade the content of existing table defined as varchar latin  to a new table definition with column varchar unicode.

Basic Question: will the physical representation of the current data be changed (apart from single byte to double byte)

I would expect then that the 1rst byte of the unicode character would be used to host the same physical representation?

OK I could do a test ...

but any hint is welcome

Rgds

JL D

1 REPLY
jld
N/A

Re: upgrading table/varchar columns definition from latin to unicode - content representation

OK,

made a test

CREATE MULTISET TABLE <schema>.LATIN_VS_UNICODE ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

      DEC_ID               INTEGER,

      LATIN_CHAR           VARCHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,

      UTF_CHAR             VARCHAR(1) CHARACTER SET UNICODE NOT CASESPECIFIC

  )

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 65, 'A', 'A' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 66, 'B', 'B' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 67, 'C', 'C' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 68, 'D', 'D' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 69, 'E', 'E' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 70, 'F', 'F' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 97, 'a', 'a' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 98, 'b', 'b' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 99, 'c', 'c' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 100, 'd', 'd' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 101, 'e', 'e' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 102, 'f', 'f' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 153, 'Ö', 'Ö' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 137, 'ë', 'ë' ) ;

INSERT INTO <schema>.LATIN_VS_UNICODE VALUES ( 145, 'æ', 'æ' ) ;

select * from  <schema>.LATIN_VS_UNICODE ;

Select DEC_ID , CHAR2HEXINT(LATIN_CHAR),  CHAR2HEXINT(UTF_CHAR) from  <schema>.LATIN_VS_UNICODE ;

assumption seems confirmed

JL D