<div dir="rtl"><br><div dir="ltr" style="text-align:left">Thanks Markus.<br><br>I've corrected my syntax, but have received a new error (it actually export an empty file: 'nothing to export'), and the csv file is not being created.<br>
<br></div><div dir="ltr" style="text-align:left">That is my syntax:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">GRASS 7.0.svn (Israel):~ > db.out.ogr input=allpairs1 dsn=/home/dof1985/Grass_projects/allpairs.csv format=CSV<br>
WARNING: 20167 line(s) found, but not requested to be exported. Verify<br>         'type' parameter.<br>Exported table </home/dof1985/Grass_projects/allpairs.csv.csv><br><br></blockquote><div><br></div><div>
I have tried to export a map with two tables connected to it. Running v.db.tables -p, I can see that there names are: allpairs1_1 and allpairs_set10k. I would like to export both to either one or two csv files.<br><br></div>
<div>I have also attempted to export one table (allpairs1_1) to a distinct map and exporting it, yet have received the same error and there was no file creation.<br><br>Hope you could aid me with it,<br></div><div><br></div>
<div>Best,<br><br>Dor <br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2013/4/1 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Apr 1, 2013 at 5:08 PM, דור פרידמן <<a href="mailto:dof1985@gmail.com">dof1985@gmail.com</a>> wrote:<br>

> Hi all,<br>
><br>
> I'm trying to use db.out.ogr to export an attributes table to a csv format<br>
> for excel. I am using GRASS 7, but not sure what to put in the "dsn="<br>
> syntax.<br>
<br>
</div>The dsn parameter is the path + filename to the *output* file.<br>
<div class="im"><br>
> This is the command I have used and the error that has appeared. Further<br>
> when the file will be created, where can I find it?<br>
><br>
>> db.out.ogr input=distance1<br>
>> dsn=/home/dof1985/Grass_projects/Waste/Israel/CD-waste/sqlite/sqlite.db<br>
>> format=CSV table=shortest_distance<br>
<br>
</div>Apparently you try to overwrite the internal GRASS database... better don't :-)<br>
<br>
See the second example in the manual:<br>
<a href="http://grass.osgeo.org/grass64/manuals/db.out.ogr.html" target="_blank">http://grass.osgeo.org/grass64/manuals/db.out.ogr.html</a><br>
<br>
The dsn parameter should point to the output CSV file:<br>
<br>
db.out.ogr input=distance1 dsn=/home/dof1985/shortest_distance.csv format=CSV<br>
<br>
I agree that it is a bit confusing, since the db_table parameter should not<br>
be used in this case (only if you write the output to a database system).<br>
<br>
Essentially we follow the logic of GDAL/OGR here.<br>
<br>
Since we are in GRASS 7 (where we may change parameters), I would not<br>
mind to see a more intuitive solution here.<br>
<br>
Dor, others: meanwhile manual improvements would be welcome (text<br>
snippets to add to the manual).<br>
<span class="HOEnZb"><font color="#888888"><br>
Markus<br>
</font></span></blockquote></div><br></div>