Home » SQL & PL/SQL » SQL & PL/SQL » update (oracle 10g)
update [message #406147] Tue, 02 June 2009 09:53 Go to next message
ravi214u
Messages: 153
Registered: February 2008
Location: CANADA
Senior Member
Hi all,

I need to update 3 column in the same table based on different condition. Please give me a hint which query i use. Individual query of all update or handle in single query eg

Update GD
SET GD.TD =(select ABD.TD from ABD,GAC where ABD.SEQ=GAC.SEQ
And GAC.GI=GD.GI
AND ABD.TD > GD.TD AND GD.TD is null AND ABD.TD is not null)
,
GD.TT=(select ABD.TT from ABD,GAC where ABD.SEQ=GAC.SEQ
And GAC.GI=GD.GI
AND ABD.TT > GD.TT AND GD.TT is null AND ABD.TT is not null)
,
GD.TF==(select ABD.TF from ABD,GAC where ABD.SEQ=GAC.SEQ
And GAC.GI=GD.GI
AND ABD.TF > GD.TF AND GD.TF is null AND ABD.TF is not null)
Re: update [message #406148 is a reply to message #406147] Tue, 02 June 2009 09:56 Go to previous message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Why isn't this one working for you, aside form the obvious duplicated-equal-sign syntax error?
Previous Topic: SQL Server code required based on Oracle
Next Topic: Oracle: SQL to query all column names on all tables
Goto Forum:
  


Current Time: Sat Feb 15 02:25:14 CST 2025