Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Update Query - Help Needed Please

Update Query - Help Needed Please

From: Dipen Kotecha <dkotecha_at_ford.invalid>
Date: Fri, 27 Aug 1999 15:59:12 +0200
Message-ID: <37C699B0.A6CE06DC@ford.invalid>


This seems quite complex to me as I do not often write updates. Hopefully someone can help.

The following select query shows me the rows that I need to update. The problem is the correct syntax for turning it into an update query.

SELECT t1.date
FROM t1, t2, t3
WHERE
t1.date IS NULL

and t1.id=t2.id
and t2.date IS NOT NULL
and t1.id=t3.id
and t3.name IS NOT NULL

Now this query will give me a whole set of NULL dates as the result. What I need to do is to update those dates (t1.date) to t2.date only for the dates returned by the above query. All three tables are linked by id, a unique key.

Any help or advice will be greatly appreciated. Thanks in advance,

Dipen Received on Fri Aug 27 1999 - 08:59:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US