Mel,
> Thanks a lot Josh!!
You're welcome.
> I wasn't thinking too hard..
>
> but then again the 2nd option (UPDATE..SET..FROM) you gave is really
> something new to me. =)
Unlike *some* databases, PostgreSQL supports sub-selects just about anywhere;
in the SELECT, FROM, WHERE, and/or HAVING clauses. I recommend buying a good
advanced SQL book to give you and idea of the possibilities, such as Joe
Celko's "SQL for Smarties, 2nd Ed.".
--
-Josh Berkus
Aglio Database Solutions
San Francisco