[GRASS-SVN] r48519 - grass/branches/releasebranch_6_4/scripts/v.db.univar

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 28 03:15:33 EDT 2011


Author: neteler
Date: 2011-09-28 00:15:33 -0700 (Wed, 28 Sep 2011)
New Revision: 48519

Modified:
   grass/branches/releasebranch_6_4/scripts/v.db.univar/v.db.univar
Log:
only remove mapset in SQL statement

Modified: grass/branches/releasebranch_6_4/scripts/v.db.univar/v.db.univar
===================================================================
--- grass/branches/releasebranch_6_4/scripts/v.db.univar/v.db.univar	2011-09-28 07:02:41 UTC (rev 48518)
+++ grass/branches/releasebranch_6_4/scripts/v.db.univar/v.db.univar	2011-09-28 07:15:33 UTC (rev 48519)
@@ -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