Re: [SQL] update column with multiple values

2012-02-10 Thread David Johnston
-Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of ssylla Sent: Wednesday, February 08, 2012 9:31 PM To: pgsql-sql@postgresql.org Subject: [SQL] update column with multiple values Dear list, sorry, I already posted this, but it

[SQL] update column with multiple values

2012-02-10 Thread ssylla
Dear list, sorry, I already posted this, but it did not seem to have been accepted by the mailing list. So here's my second try: I need to update all rows of a column ('parent') based on a subquery that returns me the first four digits of another column ('id'): UPDATE admin SET parent=(SELECT SU