Thanks for the suggestion...it needed only one small change:
update tsubset set k = t.k from t where t.f=tsubset.f;
Thanks!
Alban Hertroys wrote:
Rick Schumeyer wrote:
foreach f in tsubset
update tsubset set k=(select k from t, tsubset where t.f=f);
end
Can this be done with one SQL statement?
I think you mean
update tsubset set k = t.k from t where t.f = f;
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/