Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare complete records from one table to another
Message
De
01/02/2006 08:45:19
 
 
À
06/01/2006 16:49:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01084267
Message ID:
01092291
Vues:
16
>>I was appending marked records from one table to another under a certain condition and for what ever reason it did not get them all in many groups where the condition is met. I need to get the ones that did not move over and make sure they do. I am going to run through the ones with the condition and search through the groups on the other table and compare field values to see if they match, if so I know those got move already, if not, I will copy them to a sub-table which are the ones it missed which I need to add in. I was wondering if there is any kind of function that will compare all values on a whole record to those of a record in another table to see if they match perfectly without writing code to compare every field one by one with .and. conditions?
>
>You could use SCATTER NAME to create an object for each one and then compare the objects with COMPOBJ():
>
>
>SELECT Table1
>SCATTER NAME oTab1
>
>SELECT Table2
>SCATTER NAME oTab2
>
>IF COMPOBJ(oTab1, oTab2)
>  * They match
>ENDIF
>
>
>Tamar


Using the compobj function worked perfectly for what I needed to do.

Thanks
``` Appreciate a normal day, it is always better than a bad one ```

Kev
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform