General information
Category:
Coding, syntax & commands
Title:
Multichanges to a table
hey everyone,
i am trying to make multiple changes to a table. what i have is a table that needs to be update for many instances. for instance, i have a table that holds all accounting id's which need to be updated from 2 digits to 5 digits.
example:
ap10, ar10, gl10 needs to be updated to ap10001, ar10001, gl10001 along with other ap's, ar's, etc..
here is what i have tried:
select a_acct
acct_num = substr(acct->id,3,2)
scan
do case
case acct_num = 10
nRec_no = rec()
update a_acct set acct->id = 10001 where nRec_no = rec()
case acct_num = something else
do same thing pretty much
endcase
loop
endscan
The problem is once the first condition is satisfied, the program jumps out of the case and scan and ends. my question is, how do i code it so that it not only fixes the first condition that is satisfied but all conditions. that is so that it not only solves for ap10 but also for ar10, gl10, etc.. does anyone have any suggestions on how to clean up this code? thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only