|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
update from inout table to output table
I want to update as:
update outputtable set outputtable.date = Intputtable.date where outputtable.filed1=inputtable.field1 AND outputtable.filed2=inputtable.field2 AND outputtable.filed3=inputtable.field3 This select below gives the records I want to match for update: SELECT b.date FROM outputtable b,inputtable a WHERE a.filed1=b.filed1 AND a.filed2=b.filed2 AND a.filed3=b.filed3 this select fetches 90 records correctly. I want update b.date with a.date, for this can you please suggest update query? Please note field1,field2 and field3 of inputtable is unique. Please help thanks |
|
#2
|
|||
|
|||
|
Code:
update outputtable
set outputtable.date = (select Intputtable.date
from inputtable
where outputtable.filed1=inputtable.field1
AND outputtable.filed2=inputtable.field2
AND outputtable.filed3=inputtable.field3)
where (filed1,filed2,filed3) in
(select field1,field2,field3
from inputtable)
|
|
#3
|
|||
|
|||
|
SQL update reply
Thank you for your reply, it is great and gives exact records that it updates. But before I commit this update , is there any way to check the records that are being updated? please help
Thank you Quote:
|
|
#4
|
|||
|
|||
|
What do you mean by check the updated rows?
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > update from inout table to output table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|