Discussion:
alter table
(too old to reply)
Glenn Johansen
2008-10-13 21:08:05 UTC
Permalink
any way to change a field size with alter table.
I want to change a field called status from CHAR(2) to CHAR(8)

TIA - glenn
Ken Mayer [dBVIPS]
2008-10-13 21:57:08 UTC
Permalink
Post by Glenn Johansen
any way to change a field size with alter table.
I want to change a field called status from CHAR(2) to CHAR(8)
Nope. Drop field, add field ... that's about it ... and of course, can
be problematic if the field has data in it that you want to keep.

(Add new field(1), copy data to new field(1), drop old field, add new
field(2) with old name and new size, copy data to new field(2), drop new
field(1))

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Glenn Johansen
2008-10-14 13:50:59 UTC
Permalink
Post by Ken Mayer [dBVIPS]
(Add new field(1), copy data to new field(1), drop old field, add new
field(2) with old name and new size, copy data to new field(2), drop new
field(1))
Yea that's what I did, thanks Ken.
Post by Ken Mayer [dBVIPS]
Post by Glenn Johansen
any way to change a field size with alter table.
I want to change a field called status from CHAR(2) to CHAR(8)
Nope. Drop field, add field ... that's about it ... and of course, can be
problematic if the field has data in it that you want to keep.
(Add new field(1), copy data to new field(1), drop old field, add new
field(2) with old name and new size, copy data to new field(2), drop new
field(1))
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Glenn Johansen
2008-10-14 13:51:14 UTC
Permalink
I'll look at this.

Thanks Geoff.
says...
Post by Glenn Johansen
any way to change a field size with alter table.
I want to change a field called status from CHAR(2) to CHAR(8)
TIA - glenn
Glenn,
You may be interested in the modistru.cc in the dUFLP.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Geoff Wass [dBVIPS]
2008-10-14 04:58:20 UTC
Permalink
In article <***@news-server>, ***@saiamerica.net
says...
Post by Glenn Johansen
any way to change a field size with alter table.
I want to change a field called status from CHAR(2) to CHAR(8)
TIA - glenn
Glenn,

You may be interested in the modistru.cc in the dUFLP.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Loading...