Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    3

    Unanswered: Problem in using COALESCE or VALUE when Database is configured for UTF-8

    Hi,
    I am facing a percompilation problem while using COALESCE or VALUE when the database I connect to is configured for code set UTF-8 and code page 1208

    The same Embedded SQL is successfully precompiled when i connect to a Database configured for code set ISO8859-1and code page 819.

    The same SQL works perfectly fine when executed as a CLP

    The SQL I am using is given below
    EXEC SQL SELECT
    VALUE(CHAR(DateColumn),'NULL')
    INTO
    :h_Image
    FROM table;

    The program is written in ProC++
    Can somebody help me?

    Other relevant details
    OS - AIX 4.3
    UDB - 7.2

    Thanks in Advance
    Krishna
    Last edited by KrishnaK; 02-06-03 at 03:39.

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi Krishna,

    I feel that it is problem with the bytes of data stored. If your database is having language as Japnese or chinese or any other language, then you need to take care of the bytes as one Japnese character will take 3 bytes unlike the normal english characters. Since your column is a datecolumn, it should be checked with the bytes storage in different languages.

    Hope this helps,

    cheers,
    Prashant

  3. #3
    Join Date
    Feb 2003
    Posts
    3
    Originally posted by dahalkar_p
    Hi Krishna,

    I feel that it is problem with the bytes of data stored. If your database is having language as Japnese or chinese or any other language, then you need to take care of the bytes as one Japnese character will take 3 bytes unlike the normal english characters. Since your column is a datecolumn, it should be checked with the bytes storage in different languages.

    Hope this helps,

    cheers,
    Hi Dahalkar,
    I have tried a few combinations of the SQL and found that the following works
    EXEC SQL SELECT
    CHAR(VALUE(DateColumn,DATE('0001-01-01')))
    INTO
    :h_Image
    FROM table;

    If it had been the character size problem then the above SQL must have failed.

    I am wondering whether there is a problem with the usage of CHAR function with VALUE column function. I am not sure why VALUE should fail because of multi byte.

    I checked up a few sites for any patches, known problems but couldn't find any.


    Thanks,
    Krishna

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605

    Re: Problem in using COALESCE or VALUE when Database is configured for UTF-8

    Hi,

    Have you tried establish connection with IBM support.

    Hope this helps,
    Grofaty

    Originally posted by KrishnaK
    Hi,
    I am facing a percompilation problem while using COALESCE or VALUE when the database I connect to is configured for code set UTF-8 and code page 1208

    The same Embedded SQL is successfully precompiled when i connect to a Database configured for code set ISO8859-1and code page 819.

    The same SQL works perfectly fine when executed as a CLP

    The SQL I am using is given below
    EXEC SQL SELECT
    VALUE(CHAR(DateColumn),'NULL')
    INTO
    :h_Image
    FROM table;

    The program is written in ProC++
    Can somebody help me?

    Other relevant details
    OS - AIX 4.3
    UDB - 7.2

    Thanks in Advance
    Krishna

  5. #5
    Join Date
    Feb 2003
    Posts
    3

    Re: Problem in using COALESCE or VALUE when Database is configured for UTF-8

    Originally posted by grofaty
    Hi,

    Have you tried establish connection with IBM support.

    Hope this helps,
    Grofaty
    Hi,
    I am not subscribed to IBM Support. Hence trying my luck in this site ; )

    Regards,
    Krishna

Posting Permissions

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