If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Error message "column number out of range" after trying to drop a column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-19-08, 09:21
CCMF CCMF is offline
Registered User
 
Join Date: Nov 2004
Posts: 16
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
Reply With Quote
  #2 (permalink)  
Old 08-19-08, 10:29
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #3 (permalink)  
Old 08-19-08, 10:36
CCMF CCMF is offline
Registered User
 
Join Date: Nov 2004
Posts: 16
Thanks, Knut.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On