Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    67

    Unanswered: Error message "column number out of range" after trying to drop a column

    When I tried to issue the following sentence

    alter table my_table drop column my_column

    I got the following message:
    DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
    SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "column number out of range".) SQLSTATE=58004

    Could this be due to a certain number of columns? This table has 26 columns. I also made "alter table ... drop column ..." on tables with less columns and it worked fine.

    Is there any workaround?

    DB2 9 FP 2 on Windows Server 2003

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    SQL901 means: call IBM support to get this fixed

    As a work-around, you could rename the table, create a new table without the column to be dropped, copy all data and reestablish any referential constraints (foreign keys), triggers, and other dependent objects.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Nov 2004
    Posts
    67
    Thanks, Knut.

Posting Permissions

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