0

enter image description here

How do I make the query like this?

UPDATE DUA_DATA_FIL_AUD
SET REV       = :rev,
  SYS_UPDT_TS = :now
WHERE DUA_DATA_FIL_ID = 283
AND REV = 2524;

And so on for all the next 13 records and update all the corresponding columns?

user2672165
  • 2,986
  • 19
  • 27
AppSensei
  • 8,270
  • 22
  • 71
  • 99

1 Answers1

2

Create a result of dynamic update queries using a select form the table you want to apply the updates on it's result set.

This shall create you a sort of script that you can copy and run in your command window to update the desired lines.

Hope this addresses what you really want :

    SELECT 'UPDATE DUA_DATA_FIL_AUD SET REV = :rev, SYS_UPDT_TS = :now WHERE 
DUA_DATA_FIL_ID =' || DUA_DATA_FIL_ID || 'AND REV =' || MAX(REV) || ';/'
    FROM DUA_DATA_FIL_AUD GROUP BY DUA_DATA_FIL_ID,REV
KAD
  • 10,972
  • 4
  • 31
  • 73