UPDATE with JOIN

From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: UPDATE with JOIN
Date: 2005-05-24 18:02:40
Message-ID: 20050524175811.M92003@narrowpathinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I am banging my head againset the wall trying to figure out how to do a JOIN
within an UPDATE. Can someone please help me out? Here is what I have. Of
course it does not work. :-(

UPDATE tbl_line_item
SET tbl_line_item.reviewed = TRUE
FROM tbl_item
ON ( tbl_line_item.item_id = tbl_item.id )
WHERE item_type = 'DIR';

Kind Regards,
Keith

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-05-24 18:26:21 Re: UPDATE with JOIN
Previous Message Bruno Wolff III 2005-05-24 17:20:20 Re: "NOT NULL"