Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confused with APPEND FROM a TO b FOR x = varx
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00230396
Message ID:
00230557
Vues:
17
Hi Sylvain,

>If the field Country does exist in the destination table, VFP will only test the first record from the original table and append no or all records depending if the first record match the condition.

I have not experienced that! When I have run APPEND FROM with a FOR clause, it has worked correctly. For example, I used the following code to create a cursor of the Procedure/Function and Parameter statements from one of my procedure files:

CREATE CURSOR Prg (Line C(254))
APPEND FROM Mc_procs.Prg TYPE SDF ;
FOR UPPER(LEFT(ALLTRIM(prg.line),4))=="PROC" ;
OR UPPER(LEFT(ALLTRIM(prg.line),4))=="FUNC" ;
OR UPPER(LEFT(ALLTRIM(prg.line),4))=="LPAR" ;
OR UPPER(LEFT(ALLTRIM(prg.line),4))=="PARA"

Perhaps using a cursor as the destination or the TYPE SDF has some effect, I don't know. Do you name the destination alias in the FOR clause that fails?? (BTW, I got help creating this code from Christof Lange)
Bill Armbrecht
VFP MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform