update statement
Oracle OPM
12.2.10
requirement to udpate custom table with below example
first time the cnt column will update as 1 and previous_cnt will be 0 then whenever next record is updated then cnt will be 2 and previous_cnt will be 1 and update_time will be previous_time (only time no date) and hash_key value should get updated in previous_hash column
please i need help with the udpate statement
for example
select hash_key, cnt, previous_cnt, update_time, previous_hash from sc_test
for second record trying to update is not working, please i need help
UPDATE SC_TEST A SET A.CNT = (SELECT COUNT(*) FROM SC_TEST B WHERE HASH_KEY IS NOT NULL AND B.INV_NUMBER = A.INV_NUMBER )