Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014
    Posts
    1

    Unanswered: Fail to create table with length unit CODEUNITS32

    I tried to create table as follows but got error. DB2 version is 10.5.1
    CREATE TABLE MYTABLE (
    COL1 CHAR(10 OCTETS),
    COL2 GRAPHIC(10 CODEUNITS16),
    COL3 VARCHAR(10 CODEUNITS32))
    /

    DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "CODEUNITS32" was found following "<length>". Expected tokens may include: ")". SQLSTATE=42601

    db2 get db cfg | grep "code set"
    Database code set = UTF-8

    Any help is appreciated!

  2. #2
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    The v10.5 syntax diagram for this create table clause is a bit unclear but possibly the note (4) is relevant for char/varchar - "CODEUNITS32 is currently unavailable"

Tags for this Thread

Posting Permissions

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