Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Expansion with REPLACE
Message
De
23/04/2002 21:23:49
 
 
À
23/04/2002 17:12:22
Donald Lowrey
Data Technology Corporation
Las Vegas, Nevada, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00648428
Message ID:
00648500
Vues:
14
If you are trying to replace EVERY field in the table:
for m.lnCnt = 1 to fcount("myable")
   m.lcfieldname = "mytable."+field(m.lnCnt,"mytable") && ex. to illustrate changing field name
   m.lcvalue = "myvalue"
   SELECT mytable
   REPLACE (m.lcfieldname) WITH m.lcvalue
next
If you have fields like field1,field2,field3...
 m.lcfieldname = "mytable.field"+alltrim(str(m.lnCnt)) && ex. to illustrate changing field name
   m.lcvalue = "myvalue"
   SELECT mytable
   REPLACE (m.lcfieldname) WITH m.lcvalue
   m.lnCnt = m.lnCnt + 1
HTH
Elmer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform