Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing/ updating data in a database
Message
 
 
To
02/05/2002 10:22:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00651651
Message ID:
00651878
Views:
24
In this case you can select all records you want to process into a cursor, scan it and process record by record. You can use SEEK to speed up finding records in the tables.

>if i scan, how do i incorporate the other table under another alias into the equation. here is kind of what i was thinking.
>
>do while not eof() (or some other condition)
>
> select a_alias
> locate for custid = id, field2 < 0 , field3 = variable
> insert into table (fieldnames) values (variablenames)
> update a_alias
> set field2 = something, field3 = somethingelse
> where custid = id
>
> select a_anotheralias
> insert into table (fieldnames) values (variablenames)
> .....the variables on this one are set from some fields in the original locate
>
>next
>
>the problem is though that the tables are pretty big and the locate is slow as a dog. any suggestions? thanks.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform