[GRASSLIST:5176] Re: db.select problem

Stephan Holl sholl at gmx.net
Thu Dec 16 08:23:43 EST 2004


Hello grit, 

On Thu, 16 Dec 2004 14:10:58 +0100 grit
<grit.schuster at geographie.uni-freiburg.de> wrote:

> Hello,
> 
> could anybody please give me an idea about what I'm doing wrong?
> I'm running db.select on the grass prompt with
> 
> db.select table=corinelandcover sql='select * from corinelandcover
> where BEREICH_NR=3 and GRUPPE_NR=31 and ART_NR=311'
> 
> 
> Running the same sql query on db.select interative the following lines
> are printed:
> 
> db.select driver=dbf table=corinelandcover sql='select * from 
> corinelandcover where BEREICH_NR=3 and GRUPPE_NR=31 and ART_NR=311' 
> fs=|| vs=-- nv=NULL input=/home/grit/sqlstatement
> Sorry <*> is not a valid option
> Sorry <from> is not a valid option
> Sorry <corinelandcover> is not a valid option
> Sorry <where> is not a valid option
> Sorry, <BEREICH_NR> is not a valid parameter
> Sorry <and> is not a valid option
> Sorry, <GRUPPE_NR> is not a valid parameter
> Sorry <and> is not a valid option
> Sorry, <ART_NR> is not a valid parameter

Have you tried another syntax?

This should do:
echo "SELECT * FROM corinelandcover WHERE BEREICH_NR=3 AND GRUPPE_NR=31
AND ART_NR=311"|db.select


Make sure, that the table is existent in your location/mapset/dbf-folder

Cheers
	Stephan


-- 
Stephan Holl

Check headers for GnuPG Key!
http://www.gdf-hannover.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20041216/31d2dda8/attachment.bin


More information about the grass-user mailing list