On 02/07/09 18:52, Milton Cezar Ribeiro wrote:
Dear all,
I just imported a shapefile on GRASS, and I need to convert several fields from CHAR to numeric (double precision) - at my own risk, of course.
Can I do it on grass, or I need to redo the thinks on arcgis ?!

Depends on your database backend. In PostgreSQL (and perhaps SQLite), you could do something like this:

echo "alter table XYZ alter column ABC type numeric" | db.execute

I don't think anything like this would be possible in dbf...

You could also try a combination of v.db.addcol + v.db.update to create new numeric columns and set the value of these columns to the value of the varchar column.

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to