Re: Informix column change column type from char to int
Posted in 1998
In article <71a6fh$cja$1@nnrp1.dejanews.com>, seema2@my-dejanews.com () wrote: > Hi all: > > I need help with this scenario. In our Informix database I need to > change a > column from char(200) to integer. This column is also part of an index. > The > data would be a hash value of type integer rather than a character > format as > it is now. > > My question is: Can I implement this with an ALTER TABLE statement? Or > would I > need to do some form of unload/load to accomplish this. How should I > handle > existing values of the column? > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own > > If you are sure the data will definitely convert then drop the index, alter the table and put the index back. Various other options can be used but there is no version specified so I'd try the following if you are sure the data will definitely convert then drop the index, alter the table and put the index back. Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.co.uk