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 when 'alter table ... alter column ... set data type char(n+x)'

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-10, 15:42
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #2 (permalink)  
Old 07-13-10, 15:47
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
oops, I was doing it in our dev environment which is db2 v8.2. tried it in db2 v9.5 and it worked.
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
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