Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Producing an Update Log
Message
De
15/10/2014 10:40:34
 
 
À
14/10/2014 18:37:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01609383
Message ID:
01609444
Vues:
98
>Hi All:
>
>I have been asked to produce a file with 300,000 records for viewing in SharePoint (of which I know little).
>
>Thereafter, instead of rerunning the generation of the file, the SP programmer wants me to produce an update log with Changes, Adds and Deletes. He would then use this file to update the master file.
>
>My idea would be to produce the current copy of the humongous file and then run a compare program that would generate the Update log. It goes without saying that each record has a unique PK.
>
>My questions:
>
>1. Does this appear to be a sound approach?
>2. Is there a quicker way to compare records other than looping thru each field in the record?
>

If you have a table that contains the base records and you want to compare the current records, you can certainly use a query:
SELECT MyRealTable.* ;
   FROM MyRealTable ;
     JOIN MostRecentCopy ;
        ON MyRealTable.PK = MostRecentCopy.PK ;
     WHERE MyRealTable.Field1 <> MostRecentCopy.Field1 ;
             OR MyRealTable.Field2 <> MostRecentCopy.Field2 ;
          .... ;
    INTO CURSOR csrNewChanges
You'll also need queries to find records you've added or deleted. And then, of course, when you're done, your current table becomes the most recent copy.

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

Click here to load this message in the networking platform