[postgis-users] More newbie' questions
Tim Robertson
trobertson at gbif.org
Tue Apr 10 01:23:56 PDT 2007
Hi
Perhaps something like this might help?
update b inner join p on p.numerodist=b.numerodist and and
p.numerosecc=b.numerosecc set b.areaB = p.areaP
?
_____
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Gustavo
Ces
Sent: Tuesday, April 10, 2007 10:21 AM
To: PostGIS Users Discussion
Subject: [postgis-users] More newbie' questions
Hi all,
I´m trying to insert a column data ( double precision) from table p into
another column b with two common columns( numerodist and numerosecc):
update b set areaB=(select p.areaP from p, b where
p.numerodist=b.numerodist
and p.numerosecc=b.numerosecc);
but this way i can´t because the result is a lot of rows, not a single one.
How can i update my p table with the value of just one row of the first one?
I know this is a sql question but i read the postgres reference and don´t
know how to solve this.
Thanks in advance,
Galois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070410/d640dcd9/attachment.html>
More information about the postgis-users
mailing list