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 -> Re: SQL update query - help please!

Re: SQL update query - help please!

From: Angelo Cavallaro <angelo.cavallaro_at_pcm.bosch.de>
Date: 1998/01/23
Message-ID: <34C897E0.68EA@pcm.bosch.de>#1/1

I think the easiest way is to split the Update. Like this:
1. update table_a a set

   a.total = (select sum (b.value) from table_b b where a.id=b.id ); 2. update table_a a set

   a.total = (select max(a2.total)+sum(b.value)+max(a2.sub_total)

		 from table_c c, table_a a2
		where c.id=a2.id
		  and a2.rowid = a.rowid );

The MAX-Function is here again a Dummy-Function.

Does anybody know a better solution ?

Angelo. Received on Fri Jan 23 1998 - 00:00:00 CST

Original text of this message

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