Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    40

    Unanswered: 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

  2. #2
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    use "vargraphic" instead

  3. #3
    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

  4. #4
    Join Date
    Jun 2008
    Posts
    40
    Hi ,
    Got the solution need to replace each apostrophe with another apostrophe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •