Re: Informix column change column type from char to int
Posted in 1998
To put it simply: if there are only numerics in this field now, then ALTER TABLE will work just fine. If it finds any non-numerics then it will fail. In article <3639d910.0@news.one.net>, "Thomas J. Girsch" <tgirsch@iname.com> wrote: > You would need to run appropriate UPDATE statements to get rid of the alpha > characters in that column before running the ALTER TABLE. Once you've > eliminated all alpha characters, the ALTER TABLE will work. > > By itself, you can't do an ALTER TABLE from alpha to int if there are > non-numeric characters in the column. > > seema2@my-dejanews.com wrote in message > >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