Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing/ updating data in a database
Message
 
 
To
02/05/2002 09:43:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00651651
Message ID:
00651826
Views:
21
>just replacing is not going to work. i am trying to select a certain field because i have to use data from that record to insert into another table. then i want to update the table i have selected from. really what i am trying to do is select for a certain customer id that meets certain conditions. then insert information in that table that for the customer. update the record i was just looking at. go to another table to insert some information. then finally go back to and repeat the loop for the next record that meets the condition. that is why i am trying to select * from table where customerid = id and...... i realize that my initial thread was a little confusing. thanks for the help.

It looks like SCAN should work for you in this case
select a_alias
SET ORDER TO
SCAN 
  IF field1 = variable1 and field2 < 0
    ...  
    REPLACE field1 WITH variable2, field2 with newnumber ;
           FOR field1 = variable1 
  ENDIF
ENDSCAN
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform