I try to interview two vectors with tables with SQL query.
when I write :
echo "update table table1 set attribute1 = 1 where table1.attribute2 =
table2.attribute2" |db.execute
I receive an error message. Is there a syntax error with the point between tables and attributes?
Any idea? Can I use sql query to interview two tables in the
same time?
thanks a lot.
On Tuesday 30 June 2009, Quentin Page wrote:
I try to interview two vectors with tables with SQL query.
when I write :
echo "update table table1 set attribute1 = 1 where table1.attribute2 =
table2.attribute2" |db.execute
I receive an error message. Is there a syntax error with the point
between tables and attributes?
Any idea? Can I use sql query to interview two tables in the
same time?
What is the database back-end? As far as I know, you cannot use update
statements like this with the DBF back-end.
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
My database is postgres/postgis (pg)
error message :
error's synthaxe when i write whitout "." for query only one table there's no error
quentin
Dylan Beaudette a écrit :
On Tuesday 30 June 2009, Quentin Page wrote:
I try to interview two vectors with tables with SQL query.
when I write :
echo "update table table1 set attribute1 = 1 where table1.attribute2 =
table2.attribute2" |db.execute
I receive an error message. Is there a syntax error with the point
between tables and attributes?
Any idea? Can I use sql query to interview two tables in the
same time?
What is the database back-end? As far as I know, you cannot use update statements like this with the DBF back-end.
Dylan
Hi,
2009/7/1 Quentin Page <quentin.page@avignon.inra.fr>:
My database is postgres/postgis (pg)
error message :
error's synthaxe when i write whitout "." for query only one table there's
no error
update table1 set attribute1 = 1 from table2 where table1.attribute2 =
table2.attribute2;
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa