On 14/03/12 19:19, Patrick S. wrote:
Is there some possibility to do s.th as:
v.category in=gr_help1 out=gr_help1_cat option=sum value="echo 'SELECT
MAX(cat) FROM gr_help1' | db.select"
If you're on a *nix command line, you can do this:
v.category in=gr_help1 out=gr_help1_cat option=sum value=`echo 'SELECT
MAX(cat) FROM gr_help1' | db.select -c`
i.e. use backticks instead of quotes and the -c flag of db.select to
make sure that the output is only one value, without column names.
And IIRC you have to use an SQL-backend, i.e. not dbf, for max() to work.
Moritz
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user