Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro expansion help
Message
De
04/01/2000 11:37:27
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Macro expansion help
Divers
Thread ID:
00312467
Message ID:
00312467
Vues:
53
Is there another (better) way to do the following:

sele (megatable_of_data)
Scan
** pub=["AAA"|"BBB"|"CCC"|"DDD"]
** filestru= table (PUB C(3), OutStru M, InFields M, InVals M)
..sele filestru
..seek (megatable_of_data.pub)
..If !found()
....seek "ZZZ" (table entry for a generic structure)
..endif

..field_list = filestru.Infields
..value_list = filestru.InVals
..output_filename = (path) + "Ofc_" + (filestru.pub)

..Insert Into (output_filename) &field_list VALUES &value_list

..sele (megatable_of_data)
EndScan

Conditions/Thoughts:
The InFields (memo) values are meticulously entered so that the string of fields corresponds to the string of values in the InVals (memo) field. (including the parenthesis required by the Insert command.

I didn't want to do multiple Select-SQL on a large-ish table, esp. since the output files cannot be overwritten (which would require the sql results to be appended to the existing files= 2+ steps per pub)
I didn't want to hard-code the structure for each PUB value, because a table-based pub list would be easier to add to.
This logic is working perfectly in one of four installations so far. I would like to know why it DOESN'T work in the remaining 3 offices. What am I missing? TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform