Hello,
I cannot find out how to:
1. change a column name
2. remove a column
in DBF datatables, Grass 6.1 CVS.
Can somebody please tell if this is indeed impossible?
What program do you recommned for manipulating DBFs? GUI preferably but I wouldn't mind a console program.
Without remove/rename column functionality I cannot proceed with my current task, and OpenOffice.org's limit od 32767 rows is much too litle for my data.
Thanks,
Maciek
hallo,
1. change a column name
You have to create temporal table without the column, fill it with
values, delete the original table and rename the temporal table :-/
for postgres:
CREATE TABLE temp AS SELECT column1,column2 FROM table;
DROP TABLE table;
CREATE TABLE table ( column1 (type), column2 (type));
INSERT INTO table SELECT * FROM temp;
DROP TABLE temp;
2. remove a column
if you are using postgres, there is RENAME key word:
ALTER TABLE table RENAME COLUMN column to new_column;
however it seems not to work with DBF driver
in DBF datatables, Grass 6.1 CVS.
Can somebody please tell if this is indeed impossible?
What program do you recommned for manipulating DBFs? GUI preferably but I
wouldn't mind a console program.
Without remove/rename column functionality I cannot proceed with my current
task, and OpenOffice.org's limit od 32767 rows is much too litle for my
data.
I would recommned you to use Postgres for storing atribute data. There
is lot of good documentation for it (http://www.postgresql.org/docs/8.0/static/ddl-alter.html) and it can be used realy fast.
Hope, it helps...
Jáchym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
Thank you Jachym.
Postgres seems indeed what I need. I'll try to migrate soon. I found your remarks very usefull.
Maciek
----- Original Message ----- From: "Jachym Cepicky" <jachym.cepicky@centrum.cz>
To: "Maciek Sieczka" <werchowyna@epf.pl>; <grasslist@baylor.edu>
Sent: Wednesday, August 24, 2005 9:24 AM
Subject: Re: [GRASSLIST:8032] remove, rename column in DBF
hallo,
1. change a column name
You have to create temporal table without the column, fill it with
values, delete the original table and rename the temporal table :-/
for postgres:
CREATE TABLE temp AS SELECT column1,column2 FROM table;
DROP TABLE table;
CREATE TABLE table ( column1 (type), column2 (type));
INSERT INTO table SELECT * FROM temp;
DROP TABLE temp;
2. remove a column
if you are using postgres, there is RENAME key word:
ALTER TABLE table RENAME COLUMN column to new_column;
however it seems not to work with DBF driver
in DBF datatables, Grass 6.1 CVS.
Can somebody please tell if this is indeed impossible?
What program do you recommned for manipulating DBFs? GUI preferably but I
wouldn't mind a console program.
Without remove/rename column functionality I cannot proceed with my current
task, and OpenOffice.org's limit od 32767 rows is much too litle for my
data.
I would recommned you to use Postgres for storing atribute data. There
is lot of good documentation for it (http://www.postgresql.org/docs/8.0/static/ddl-alter.html) and it can be used realy fast.
Hope, it helps...
Jáchym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/