[GRASS-SVN] r48520 -
grass/branches/develbranch_6/scripts/v.db.univar
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 28 03:15:42 EDT 2011
Author: neteler
Date: 2011-09-28 00:15:42 -0700 (Wed, 28 Sep 2011)
New Revision: 48520
Modified:
grass/branches/develbranch_6/scripts/v.db.univar/v.db.univar
Log:
only remove mapset in SQL statement
Modified: grass/branches/develbranch_6/scripts/v.db.univar/v.db.univar
===================================================================
--- grass/branches/develbranch_6/scripts/v.db.univar/v.db.univar 2011-09-28 07:15:33 UTC (rev 48519)
+++ grass/branches/develbranch_6/scripts/v.db.univar/v.db.univar 2011-09-28 07:15:42 UTC (rev 48520)
@@ -114,12 +114,12 @@
drv="driver=$GIS_OPT_DRIVER"
fi
-# strip off mapset
-GIS_OPT_TABLE=`echo $GIS_OPT_TABLE | cut -d'@' -f1`
+# strip off mapset for SQL
+MYGIS_OPT_TABLE=`echo $GIS_OPT_TABLE | cut -d'@' -f1`
if [ -z "$GIS_OPT_WHERE" ] ; then
- db.select table="$GIS_OPT_TABLE" ${db} ${drv} sql="select $GIS_OPT_COLUMN from $GIS_OPT_TABLE" -c > "$TEMPFILE"
+ db.select table="$GIS_OPT_TABLE" ${db} ${drv} sql="select $GIS_OPT_COLUMN from $MYGIS_OPT_TABLE" -c > "$TEMPFILE"
else
- db.select table="$GIS_OPT_TABLE" ${db} ${drv} sql="select $GIS_OPT_COLUMN from $GIS_OPT_TABLE WHERE $GIS_OPT_WHERE" -c > "$TEMPFILE"
+ db.select table="$GIS_OPT_TABLE" ${db} ${drv} sql="select $GIS_OPT_COLUMN from $MYGIS_OPT_TABLE WHERE $GIS_OPT_WHERE" -c > "$TEMPFILE"
fi
More information about the grass-commit
mailing list