Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multichanges to a table
Message
From
01/02/2002 16:41:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Multichanges to a table
Miscellaneous
Thread ID:
00614296
Message ID:
00614296
Views:
52
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
Map
View

Click here to load this message in the networking platform