[GRASS-SVN] r50332 - grass/trunk/db/db.select
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 20 14:14:59 EST 2012
Author: martinl
Date: 2012-01-20 11:14:58 -0800 (Fri, 20 Jan 2012)
New Revision: 50332
Modified:
grass/trunk/db/db.select/db.select.html
Log:
db.select: minor manual clean-up
Modified: grass/trunk/db/db.select/db.select.html
===================================================================
--- grass/trunk/db/db.select/db.select.html 2012-01-20 19:01:55 UTC (rev 50331)
+++ grass/trunk/db/db.select/db.select.html 2012-01-20 19:14:58 UTC (rev 50332)
@@ -6,60 +6,76 @@
<h2>NOTE</h2>
-If parameters for database connection are already set with
-<a href="db.connect.html">db.connect</a>, they are taken as default values and
-do not need to be spcified each time. Output will be displayed to stdout or can
-be directed to a file.
+If parameters for database connection are already set with
+<em><a href="db.connect.html">db.connect</a></em>, they are taken as
+default values and do not need to be spcified each time. Output will
+be displayed to stdout or can be directed to a file.
<h2>EXAMPLES</h2>
+Basic usage:
<div class="code"><pre>
+db.select sql="select * from roads"
+</pre></div>
+or
+<div class="code"><pre>
echo "select * from roads" | db.select
+</pre></div>
or
- cat file.sql | db.select
+<div class="code"><pre>
+cat file.sql | db.select
+</pre></div>
or
- db.select input=file.sql
+<div class="code"><pre>
+db.select input=file.sql
</pre></div>
<p>
-<em>Select all from table roads</em><br>
+Select all from table roads:
<div class="code"><pre>
db.select -c driver=odbc database=g51test table=roads input=file.sql > result.csv
</pre></div>
<p>
-<em>Select some string attribute, exclude others:</em><br>
+Select some string attribute, exclude others:
<div class="code"><pre>
-echo "SELECT * FROM archsites WHERE str1 <> 'No Name'" | db.select
+db.select sql="SELECT * FROM archsites WHERE str1 <> 'No Name'"
</pre></div>
<p>
-<em>Select some string attribute with ZERO length:</em><br>
+Select some string attribute with ZERO length:
<div class="code"><pre>
-echo "SELECT * FROM archsites WHERE str1 IS NULL" | db.select
+db.select sql="SELECT * FROM archsites WHERE str1 IS NULL"
</pre></div>
<p>
-<em>Select coordinates from PostGIS table:</em><br>
+Select coordinates from PostGIS table:
<div class="code"><pre>
-echo "SELECT x(geo),y(geo) FROM localizzazione" | db.select
+db.select sql="SELECT x(geo),y(geo) FROM localizzazione"
</pre></div>
<h2>SEE ALSO</h2>
-<em><a href="sql.html">GRASS SQL interface</a>,
-<a href="db.connect.html">db.connect</a>,
-<a href="db.describe.html">db.describe</a>,
-<a href="db.drivers.html">db.drivers</a>,
-<a href="db.droptable.html">db.droptable</a>,
-<a href="db.execute.html">db.execute</a>,
-<a href="db.login.html">db.login</a>,
-<a href="db.tables.html">db.tables</a></em>
+<em>
+ <a href="sql.html">GRASS SQL interface</a>
+</em>
+<p>
+ <em>
+ <a href="db.connect.html">db.connect</a>,
+ <a href="db.describe.html">db.describe</a>,
+ <a href="db.drivers.html">db.drivers</a>,
+ <a href="db.droptable.html">db.droptable</a>,
+ <a href="db.execute.html">db.execute</a>,
+ <a href="db.login.html">db.login</a>,
+ <a href="db.tables.html">db.tables</a>
+ </em>
<h2>AUTHOR</h2>
-?<br>
+
+Original author unknown<br>
Modifications: Radim Blazek, ITC-Irst, Trento, Italy
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>
More information about the grass-commit
mailing list