echo "select * from roads" | db.select or cat file.sql | db.select or db.select input=file.sql
Select all from table roads
db.select -c driver=odbc database=g51test table=roads input=file.sql > result.csv
Select some string attribute, exclude others:
echo "SELECT * FROM archsites WHERE str1 <> 'No Name'" | db.select
Select some string attribute with ZERO length:
echo "SELECT * FROM archsites WHERE str1 IS NULL" | db.select
Select coordinates from PostGIS table:
echo "SELECT x(geo),y(geo) FROM localizzazione" | db.select
Last changed: $Date: 2006-09-21 06:31:01 +0200 (Thu, 21 Sep 2006) $
Main index - database index - Full index
© 2003-2010 GRASS Development Team