This is a discussion on ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE within the DB2 forums, part of the Database Server Software category; --> This should be easy in DB2. The statements below work in v8. If they fail on your v7 system, ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| This should be easy in DB2. The statements below work in v8. If they fail on your v7 system, you should have the PMR reopened and get an APAR: C:\tmp> db2 create TABLE ELMT_T (CDTY_CD varchar(48)) DB20000I The SQL command completed successfully. C:\tmp>db2 create view elem2 as select cdty_cd from elmt_t DB20000I The SQL command completed successfully. C:\tmp>db2 ALTER TABLE ELMT_T ALTER COLUMN CDTY_CD SET DATA TYPE VARCHAR(51) DB20000I The SQL command completed successfully. Jane wrote: > Spoke to someone from IBM and I am told that if there is a view on the > table, the table columns cannot be extended. > > Solution: > -Drop the view > -ALTER the table and Extend the varchar column. > > Nothing is easy in DB2 ... > > Thanks for everyone's input. > -Jane |