Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update multiple fields with update SQL
Message
From
05/03/2004 11:55:36
 
 
To
05/03/2004 10:16:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00883470
Message ID:
00883545
Views:
7
for only a join field, with a simple condition:
CREATE CURSOR CC1 (A I,B I,C I)
INSERT INTO CC1 VALUES (1,1,0)
INSERT INTO CC1 VALUES (2,1,0)
INSERT INTO CC1 VALUES (2,1,0)
INSERT INTO CC1 VALUES (3,1,0)
CREATE CURSOR CC2 (A I,C I)
INSERT INTO CC2 VALUES (1,11)
INSERT INTO CC2 VALUES (2,22)
INSERT INTO CC2 VALUES (3,33)
UPDATE CC1 SET C=LOOKUP(CC2.C,A,CC2.A)
SELECT CC1
BROWSE 
If CC2.A is indexed LOOKUP use the index, otherwise it scan, and return the first CC2.C

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform