[GRASS-SVN] r65884 - grass/trunk/lib/db/sqlp
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 11 02:53:24 PDT 2015
Author: neteler
Date: 2015-08-11 02:53:24 -0700 (Tue, 11 Aug 2015)
New Revision: 65884
Modified:
grass/trunk/lib/db/sqlp/sql.html
Log:
sql manual: FP calc example added
Modified: grass/trunk/lib/db/sqlp/sql.html
===================================================================
--- grass/trunk/lib/db/sqlp/sql.html 2015-08-11 08:41:59 UTC (rev 65883)
+++ grass/trunk/lib/db/sqlp/sql.html 2015-08-11 09:53:24 UTC (rev 65884)
@@ -55,7 +55,7 @@
<h3>Database table name restrictions</h3>
<ul>
-<li> No dots allowed as SQL does not support '.' (dots) in table names.</li>
+<li> No dots are allowed as SQL does not support '.' (dots) in table names.</li>
<li> Supported table name characters are only: <br>
<div class="code"><pre>
[A-Za-z][A-Za-z0-9_]*
@@ -136,13 +136,16 @@
modules):
<div class="code"><pre>
-v.db.addcolumn map=roads col="exprtest double precision"
-v.db.update map=roads col=exprtest value=cat/nulltest
-v.db.update map=roads col=exprtest value=cat/nulltest+cat where=cat=1
+v.db.addcolumn map=roads column="exprtest double precision"
+v.db.update map=roads column=exprtest value="cat/nulltest"
+v.db.update map=roads column=exprtest value="cat/nulltest+cat" where="cat=1"
+
+# using data from another column
+v.db.update map=roads column=exprtest qcolumn="(cat*100.)/SHAPE_LEN."
</pre></div>
<p>
-Examples of complex expressions in updates (using <tt>db.*</tt>
+Examples of more complex expressions in updates (using <tt>db.*</tt>
modules):
<div class="code"><pre>
@@ -179,7 +182,7 @@
where="z_value <> 'N/A'"
</pre></div>
-<h3>Example of concatenating fields</h3>
+<h3>Example of concatenation of fields</h3>
<i>Note: not supported for DBF driver.</i>
More information about the grass-commit
mailing list