Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update tables
Message
From
06/12/2002 05:10:05
 
 
To
06/12/2002 02:28:59
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00730212
Message ID:
00730221
Views:
17
>hi all
>i have two tables
>table1->id1,price1
>table2->id2,price2
>i want update table1(price1) by table2(price2) if id1=id2 by sql and not by view or programing with do while ..........and ....
>my tables are in visual foxpro and not in lower version
>how do it?

There's no update by subselect in VFP, but you can:

USE Table2 IN 0 TAG ID2
SELECT 0
USE Table1
SET RELATION TO ID1 INTO TABLE2
GO TOP
REPLACE price1 WITH Table2.price2 FOR FOUND('Table2')
SET RELATION TO
USE IN Table2
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform