[GRASSLIST:9572] Re: Using SUM() in SELECT db.execute..

Luca Casagrande luca.casagrande at gmail.com
Mon Dec 19 06:18:50 EST 2005


Alle 18:41, sabato 17 dicembre 2005, Markus Neteler ha scritto:
> On Sat, Dec 17, 2005 at 04:15:26PM +0000, Luca Casagrande wrote:
> > Hi to all guys!
> >
> > I have to create a table using this line:
> >
> > CREATE TABLE abit_totali AS SELECT cod_comune, SUM( totale_abitanti) from
> > abit_cens GROUP BY cod_comune
> >
> > Reading SQL guide, I noticed that sum() can't be used in SELECT
> > expression... How can I solve this problem (i am using dbf...)?
>
> Luca,
>
> more complex SQL statements can be used for all other backends
> than DBF. You may consider to switch to sqlite which is also
> locally stored.
>
> Markus
>
> > Thx
> > Luca


This weekend I installed Postgresql 8.1 and copied all my tables inside 
it...Now query works very fine..
Thx!
Luca
-- 
"Esperienza è il nome che ciascuno da ai suoi errori. (O. Wilde) "

GENTOO-GIS Development Team
jabber: casagrande at jabber.linux.it

 




More information about the grass-user mailing list