Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Update with a SQL Select
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00128511
Message ID:
00132630
Views:
17
>>>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)
>>>
Maybe this would work if using ODBC connection:

sqlexec(handle,"select increase from t2 where id = t1.id","tmp")
sqlexec(handle,"update t1 set rate = rate + tmp.increase")
Previous
Reply
Map
View

Click here to load this message in the networking platform