Insert/update unicode data into a table



IBM's flagship relational database management system

Insert/update unicode data into a table

Postby syykwok » Fri Jun 04, 2010 7:09 pm

Can anyone tell me how to do insert or update an unicode value to the table.

This is the DBCS set for the characters

.â(<Ìì@<ó|Õ(±â)      .        <------ Taiwan (Chinese characters)
04447574C4E48454444440    <------ hex format
E2DC88CCEFFDF2D000000F


I have tried:

SET CURRENT ENCODING SCHEME = '0937' (this is the codepage for Taiwan characters)
UPDATE <table> set <column> = X'0E424D4C78587C4CCE4FEF4D8F425D4040404040400F'

but doesn't work.

Any advise?
syykwok
 
Posts: 4
Joined: Fri Jun 04, 2010 6:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Insert/update unicode data into a table

Postby dick scherrer » Sat Jun 05, 2010 2:56 am

Hello and welcome to the forum,

but doesn't work.
If you want someone to help, you need to post more useful than "it didn't work".

What didn't work? Was there an sql error returned? Did something abend? How is this table/column defined?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Insert/update unicode data into a table

Postby syykwok » Sat Jun 05, 2010 5:14 am

Thanks,

The SQL runs ok, but the character displayed is not in the correct format, i.e. cannot see Chinese characters (I use QMF for Windows to look at the record, and the character is just rubbish)

I have defined the table and tablespace as UNICODE, and allow the column is defined as MIXED CHAR, length is 3 times of its normal length
syykwok
 
Posts: 4
Joined: Fri Jun 04, 2010 6:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Insert/update unicode data into a table

Postby dick scherrer » Sat Jun 05, 2010 11:05 pm

Hello,

Unload the table and look at the content of this column in hex. Using the Code tag, post a few of these values.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post