Results 1 to 2 of 2

Thread: CASTing fails

  1. #1
    Join Date
    Oct 2006

    Unanswered: CASTing fails

    Hi all,

    I'm trying to migrate an Informix database to DB2 and there's some tables that contain varchar fields with Greek characters.

    When I want do fetch such fields in AS/400 I use the following SELECT statement:

    SELECT CAST (CAST (field1 AS VARCHAR(100) FOR BIT DATA) AS CHAR(100) CCSID 875) AS field1 FROM table1

    I'm not keen with Informix, even the following simple statement I've run just to see how CASTing works in Informix, fails (and I don't know why):

    SELECT CAST(field1 AS VARCHAR) from table1

    Is any equivalent in Informix that does the same? Or is any other way (with example plz ) to correctly convert greek characters?

    Thanks & Regards,

  2. #2
    Join Date
    Aug 2006
    The Netherlands
    Try specifying the maximum length of the VARCHAR column, i.e. like VARCHAR(255). The absolute maximum size of a VARCHAR column is 255 bytes when not indexed. When indexed it's 254 bytes.


Posting Permissions

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