Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2194

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: v.db.renamecol</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>v.db.renamecol</b></em>  - Renames a column in a attribute table connected to a given vector map.
<h2>KEYWORDS</h2>
vector, database, attribute table
<h2>SYNOPSIS</h2>
<b>v.db.renamecol</b><br>
<b>v.db.renamecol help</b><br>
<b>v.db.renamecol</b> <b>map</b>=<em>name</em>  [<b>layer</b>=<em>integer</em>]  <b>column</b>=<em>string</em>[,<i>string</i>,...]  [--<b>verbose</b>]  [--<b>quiet</b>] 


<h3>Parameters:</h3>
<DL>
<DT><b>map</b>=<em>name</em></DT>
<DD>Vector map for which to rename attribute column</DD>

<DT><b>layer</b>=<em>integer</em></DT>
<DD>Layer where to rename column</DD>
<DD>Default: <em>1</em></DD>

<DT><b>column</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Old and new name of the column (old,new)</DD>

</DL>
<h2>DESCRIPTION</h2>

<em>v.db.renamecol</em> renames a column in the attribute table connected
to a given vector map. It automatically checks the connection for the specified
layer.

<h2>NOTES</h2>

If the map table is connected through the DBF or SQLite drivers, the renaming
is internally done by adding a new column with new name, transferring the contents
of the old column to the new column and dropping the old column. This is needed
as DBF or SQLite do not support "ALTER TABLE" command to rename columns. Due to
this the renamed column is found as last column of the table, it's original position
cannot be maintained.

<p>
The SQLite driver will exit with an error if the column rename involves only a change of 
case, i.e., upper-to-lowercase, or lower-to-uppercase. The SQLite protocol considers "NAME"
and "name" to be identical column names. In cases like these, the user should rename the original
column to an intermediary name, then rename the intermediary to the final name.

<p>


<h2>EXAMPLES</h2>

Renaming a column:<br>
<div class="code"><pre>
v.info -c myroads
v.db.renamecol myroads column=label,roadtype
v.info -c myroads
</pre></div>

<h2>SEE ALSO</h2>

<em><a HREF="db.execute.html">db.execute</a></em>,
<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
<em><a HREF="v.db.select.html">v.db.select</a></em>,
<em><a HREF="v.db.update.html">v.db.update</a></em>


<h2>AUTHOR</h2>

Markus Neteler

<p><i>Last changed: $Date: 2008-03-17 15:27:04 +0100 (Mon, 17 Mar 2008) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>