[GRASSLIST:666] Re: Postgresql query
Glynn Clements
glynn.clements at virgin.net
Wed Jul 9 09:35:12 EDT 2003
JDougherty wrote:
> > > I want to run a d.site.pg query that involes an 'OR' in the
> > > 'where' field. Ideally it should be something like:
> > >
> > > select * from <table_name> where atr='A' or atr='B';
> > >
> > > The above works from within PostgreSQL. d.site.pg however
> > > reports that 'OR' is not a valid option and that atr is not a
> > > valid parameter. I am running GRASS 5.0.3 CVS and PostgreSQL
> > > 7.3.2.
> >
> > If an option value contains spaces, you need to use quotes,
> > e.g.
> >
> > d.site.pg ... where="atr='A' or atr='B'"
>
> Thanks. It appears that the command line works. I neglected to
> mention earlier that I was trying to use the GUI tcltkgrass
> interface to d.sites.pg. It does not seem to like more
> complicated "where" clauses.
OK; tcltkgrass doesn't appear to be able to handle spaces in
arguments.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list