other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
db.copy(1grass) | Grass User's Manual | db.copy(1grass) |
NAME¶
db.copy - Copy a table.KEYWORDS¶
database, attribute table, SQLSYNOPSIS¶
db.copyFlags:¶
- --overwrite
-
- --verbose
-
- --quiet
-
Parameters:¶
- from_driver=name
-
- from_database=name
-
- from_table=name
-
- to_driver=name
-
- to_database=name
-
- to_table=name
-
- where=sql_query
-
- select=string
-
DESCRIPTION¶
db.copy allows the user to copy a table between two databases. Databases can be connected through different drivers (see example).NOTES¶
Attribute tables can be copied using db.copy and, when to be associated to a vector map, assigned to the map with v.db.connect. Current connection settings are saved in the file $LOCATION/vector_map/dbln.EXAMPLES¶
DBF -> PG¶
Storing table 'markveggy.dbf' (in current directory) into PostgreSQL through ODBC:from_table=markveggy to_driver=pg to_database="host=pgserver,dbname=grass6test" \
to_table=markveggy
PG -> DBF¶
from_table=origtable to_driver=dbf \
to_database=$HOME/grassdata/spearfish60/user1/dbf to_table=origtable
PG -> PG with condition¶
from_table=ukraine to_driver=pg to_database="host=localhost,dbname=meteo" \
to_table=selection where="cat < 500"
DBF -> SQLite¶
from_table=ammprv to_driver=sqlite \
to_database=$HOME/grassdata/spearfish60/user1/sqlite.db to_table=ammprv
SQLite -> DBF¶
from_table=ammprv to_driver=dbf to_database=$HOME/grassdata/spearfish60/user1/dbf \
to_table=ammprv
SEE ALSO¶
v.db.connect, db.drivers, db.login, v.clean, GRASS SQL interfaceAUTHOR¶
Radim Blazek, ITC-irst, Trento, Italy Last changed: $Date: 2013-03-18 18:51:35 +0100 (Mon, 18 Mar 2013) $ Full index © 2003-2014 GRASS Development TeamGRASS 6.4.4 |