Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update multiple fields with update SQL
Message
De
05/03/2004 11:55:36
 
 
À
05/03/2004 10:16:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00883470
Message ID:
00883545
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform