porthos2222
Programmer
Hello everybody. First post here, although I am a long time reader.
I am not a programmer per se in Visual Fox Pro (using version 7 and 9 depending on the computer I use here at work, possibly upgrading all PCs to VFP 9 in the near future), but I did a lot of programming in VB 6.0
I have two tables,
Table "References" structure
field "distance"(double 8,3) (This field is the distance of the road)
field "repair"(char 15)
This table has 1000 records (for example)
Table "Compare" structure
field "distance"(numeric 8,3) (This field is the distance of the road)
field "repair" (char 15)
Table "Compare" has 15 records (for example). Some of those 15 records match the distances values (or so, error less than 0.1 decimal side) in table "References"
I need to update the table "References" field "repair" with all "repair" values from "Compare" that match the "Compare" field "distance".
Something like this I supposed that it will work in VFP9
Update References ;
Set repair = Compair.repair ;
From Compair ;
Where Compair.Distance = References.Distance
But it is not working. How would you perform this?
Thank you!
Porthos
I am not a programmer per se in Visual Fox Pro (using version 7 and 9 depending on the computer I use here at work, possibly upgrading all PCs to VFP 9 in the near future), but I did a lot of programming in VB 6.0
I have two tables,
Table "References" structure
field "distance"(double 8,3) (This field is the distance of the road)
field "repair"(char 15)
This table has 1000 records (for example)
Table "Compare" structure
field "distance"(numeric 8,3) (This field is the distance of the road)
field "repair" (char 15)
Table "Compare" has 15 records (for example). Some of those 15 records match the distances values (or so, error less than 0.1 decimal side) in table "References"
I need to update the table "References" field "repair" with all "repair" values from "Compare" that match the "Compare" field "distance".
Something like this I supposed that it will work in VFP9
Update References ;
Set repair = Compair.repair ;
From Compair ;
Where Compair.Distance = References.Distance
But it is not working. How would you perform this?
Thank you!
Porthos