Oracle SQL UPDATE from SUBSELECT results ?
From: Sam Iam <thatsamiam_at_yahoo.com>
Date: 15 Apr 2002 18:43:31 -0700
Message-ID: <fe7db0d0.0204151743.6e6abe02_at_posting.google.com>
Date: 15 Apr 2002 18:43:31 -0700
Message-ID: <fe7db0d0.0204151743.6e6abe02_at_posting.google.com>
I am an Oracle newbie.
I want to update a column with data that comes as the result of a subselect.
This syntax doesn't work but it does illustrate what I want to do.
What's the way to do this in Oracle ?
UPDATE news_headlines_new SET found_date=o.found_date
WHERE headline_id=n.headline_id (
SELECT n.headline_id, o.found_date
FROM news_headlines_new n, news_headlines o
WHERE n.text = o.text AND n.url = o.url
);
Received on Tue Apr 16 2002 - 03:43:31 CEST