Sqlplus: Embedded update statement

From: Peter Kane <pkane_at_cisco.com>
Date: Sat, 6 Feb 1993 00:48:23 +0000
Message-ID: <9302060051.aa22956_at_dis.demon.co.uk>


Hi Oracle gurus, please help if you can.

I have two tables, call them "order" and "header", and they both have two columns called "value_id" and "lead".

I want something like:  

	update header.lead, setting header.lead = order.lead
	where header.value_id = order.value_id

In other words, I would like to copy lead from one table to another, where the value_id is the same. I'd like to do it in an embedded SQL statement if I can, but I guess I'm afraid I'll have to use cursor, or PL/SQL or something.

Is there an easy way to do something like this?

Thanks,

Peter Kane, pkane_at_cisco.com Received on Sat Feb 06 1993 - 01:48:23 CET

Original text of this message