Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399

    Unanswered: error when 'alter table ... alter column ... set data type char(n+x)'

    I have a table with col char(n) and I want to change its length to n+x. Why when i submit command:

    alter table ... alter column ... set data type char(n+x)
    e.g. alter table MYTABLE alter column A set data type char(25)

    I get an error message:
    SQL0190N ALTER TABLE "DBA.MY_TABLE" specified attributes for column "A" that are not compatible with the existing column.
    SQLSTATE=42837
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  2. #2
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    oops, I was doing it in our dev environment which is db2 v8.2. tried it in db2 v9.5 and it worked.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

Posting Permissions

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