Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace record from other dbf
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00994807
Message ID:
00994910
Vues:
11
>Boris repacing only one record

This code replaces 25 records:
CREATE CURSOR test (C1 C(10))
CREATE CURSOR Test2 (C1 C(10))

FOR asd = 1 TO 50
    IF asd < 26
       INSERT INTO Test2 VALUES (TRANSFORM(asd))
    ELSE
       INSERT INTO Test2 VALUES (TRANSFORM(asd-25))
    ENDIF
NEXT

INSERT INTO Test (C1) SELECT DIST C1 FROM Test2 GROUP BY c1
SELECT Test
BROW
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform