If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > unicode db problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-24-09, 04:40
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
unicode db problem

HI Guys,
I am working on db2 9.5 on aix 5.3. I have a situation where I have declared a column with varchar (5) datatatype , this means it can accept upto five bytes if i enter something like "abcde" ts fine but if i enter "abcdÖ" it throws error data too long .... My db is utf 8 . Is there a way so that it accepts five characters instead of 5 bytes as we knoe "Ö" occupies 2 bytes .
IS it to do with the setting of SBCS OR MBCS .

note : Increasing the lenght of the column is not a option
Thanks
Reply With Quote
  #2 (permalink)  
Old 06-24-09, 06:03
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
use "vargraphic" instead
Reply With Quote
  #3 (permalink)  
Old 06-24-09, 06:54
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
Hi Thanks it worked .
Now a diffrent thread (question) :I am trying to run a update stmt :UPDATE ISO_COUNTRY SET N_CNTRY='KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF' WHERE N_CNTRY='KOREA, DEMOCRATIC PEOPLE'S REP';
It throws a sql exception becuse of the " ' " because of the apostrophe in PEOPLE'S . how to take care of the aphostrophe
Reply With Quote
  #4 (permalink)  
Old 06-24-09, 07:12
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
Hi ,
Got the solution need to replace each apostrophe with another apostrophe
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On