Sounds like the answer is to upgrade to v7+
Much thanks to Tom Lane and Len Morgan for the helpful responses!
-Nick
>update one set b = (select d from two where one.a = two.c);
"Nick Fankhauser" <[EMAIL PROTECTED]> writes:
> In essence, I want to match up the records where one.a=two.c and update
> one.b with the value in two.d . In Oracle, I would use this statement:
> update one set b = (select d from two where one.a = two.c);
> in psql, I get a syntax error when I do t
Hi all-
I'm trying to match up two tables based on a primary key, and then copy
(update) a field in the second table to match a field in the first. Hard to
explain well... so here's an example:
select * from one;
a | b
-
1 | null
2 | null
select * from two;
c | d
-
1 | o