Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select and append
Message
De
01/09/2008 16:21:17
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
31/08/2008 05:25:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01343606
Message ID:
01343898
Vues:
20
To copy rows that match between a Source table and a Target Table table, check out the APPEND FROM command. If the tables don't match or one or both of the tables is actually a cursor you can do this:
sele SourceTable
scan
  scatter name oFields
  insert into TargetTable from name oFields
endscan
This will populate fields in TargetTable that match the fields in SourceTable.

If you need to create a new table to match only the fields in SourceTable, check out the AFIELDS() function combined with CREATE CURSOR FROM ARRAY/CREATE TABLE FROM ARRAY commands.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform