Please can some one help with some code here.
I have a table full of transfer numbers.
Each number has a status. (DONE, NOT DONE)
ie Trans_num || Status
1 DONE
2 NOT DONE
I want to update all the Status to done.
However i can not do it all in one go, as there are back ground rules that prevent the status being changed on a records if it does not meet the requirerments.
So if i attempt to update ALL staus in one go, , it will fail, and none of the records are changed.
Therefore i want a loop, so that 1 record at a time can be processed.
And errors are skipped over (or so i hope)
ie UPDATE mytable SET status = 'DONE' WHERE cdi_state = 'NOT DONE'
If there is anouther, anouther way way to update all of them in one go, and skip over errors that would be great.
Right now i have to ither update the records one by one of update them in small batches, which both are a pain becuase some times there can be up to 300 records to update)
Thanks
I have a table full of transfer numbers.
Each number has a status. (DONE, NOT DONE)
ie Trans_num || Status
1 DONE
2 NOT DONE
I want to update all the Status to done.
However i can not do it all in one go, as there are back ground rules that prevent the status being changed on a records if it does not meet the requirerments.
So if i attempt to update ALL staus in one go, , it will fail, and none of the records are changed.
Therefore i want a loop, so that 1 record at a time can be processed.
And errors are skipped over (or so i hope)
ie UPDATE mytable SET status = 'DONE' WHERE cdi_state = 'NOT DONE'
If there is anouther, anouther way way to update all of them in one go, and skip over errors that would be great.
Right now i have to ither update the records one by one of update them in small batches, which both are a pain becuase some times there can be up to 300 records to update)
Thanks