[GRASSLIST:8006] Re: SQL parser error in db.execute

Maciek Sieczka werchowyna at epf.pl
Sun Aug 21 05:56:22 EDT 2005


Brownyn,

From: "Bronwyn Price" <bronwyn at env.ethz.ch>
> Hi all
>
> I am trying to add a column to a table using db.execute. I use the 
> following command:
>
>  echo "ALTER TABLE rose_10_10_5 ADD COLUMN area" | db.execute

In this case you forgot to specify the column type after the name "area".

> but always get the error:
>
> SQL parser error in statement:
> ALTER TABLE rose_10_10_5 ADD COLUMN new area

Here your column name contains space, which is not supported if you are 
using DBF. And still the column type is missing.

Refer to "sql notes" manual and v.db.addcol (added in 6.1 CVS about a month 
ago).

Cheers,
Maciek 




More information about the grass-user mailing list