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.
Thanks,
John Dougherty
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'"
--
Glynn Clements <glynn.clements@virgin.net>
On Tuesday 08 July 2003 07:52, Glynn Clements wrote:
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'"
Glynn,
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.
John
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@virgin.net>