Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Update with a SQL Select
Message
From
01/09/1998 16:26:24
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00128511
Message ID:
00132070
Views:
14
>Has anyone gotten anything like this to work in VFP?
>If so, could you share some examples? Or any examples of Update/Select working together.
>
>UDPATE t1
> SET rate = rate + (SELECT increase FROM t2 WHERE id = t1.id)
>
Steve, 9-01-98
This is easy as pie in Fox.

use t2 order tag id
select 0
use t1 && in any order
set relat to id into t2
browse fields id,rate,t2.id,t2.increase && look before you leap
replace all rate with rate+t2.increase && perform the update

I've used SQL, too, and it makes everything harder than in Fox.
Good Luck,
Gary Nemeth
Gary Nemeth, 440-333-3432
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform