Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The most elegant and readable way (and efficient)
Message
De
10/12/2005 09:09:49
 
 
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:
01076714
Message ID:
01076866
Vues:
16
Hi,

Sergey's way is probably efficient enough, but on the asssumption that oodles
of records might have to be modified, I'ld prepare a replace-string
pseudo code
for every field in both tables and not in exclude list
   tcRep = iif(empty(tcRep), "" ,tcRep + ", ") + fieldname + " with iif(empty(target.fieldname) and !empty(source.fieldname), source.fieldname,  target.fieldname)"
and later call
replace all &tcRep for seek(target.PK, SourceAlias, SourceTag)

which makes just one call to makroexpansion for the whole table.
Since the whole processing of empty fields is handed off to the runtime,
it should be faster than checking in a vfp loop after positioning via code.

Also, it is immune against tables with different fcount() and so on -
but requires same field names and is a bit more work. depends on your data <g>.



my 0.02 EUR

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform