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?

1

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.