Hi I want a PL/SQL query for ORacle 10g to update a field utilizing the logic Below.
A table has the following 4 fields (non- Indexed)
The REQUEST_NUMBER plus ORDER_NUMBER form a unique key and can have various ORDER_VERSION. versions that grow incrementally from 1,2,3 and so on.
When a new version comes up the old one is made "non-current". I already have the data in the table, I want to update the CURRENT_INDICATOR to YES/NO based on the ORDER_VERSION:
LOGIC : For every REQUEST_NUMBER + ORDER_NUMBER the greatest ORDER_VERSION is the CURRENT_INDICATOR = TRUE
rest of the versions are CURRENT_INDICATOR = FALSE