Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing Records Within the Same File
Message
De
22/07/1999 11:09:49
 
 
À
22/07/1999 10:59:54
Vernon Moeller
Texas Adjutant General's Department
Austin, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00244733
Message ID:
00244739
Vues:
21
Ouch. Are you really using FPW2.6? If you are, its harder. In vfp, there are a couple of schemes, everything from creating a object from the record and comparing that to an object created from another record and so forth.

In FPW I would probably do it thru SQL. If I knew the key field I would do:

select * from mytable where mykey in (select mykey from mytable group by mykey having cnt(*) > 1)

Failing that, you may well have to go field by field. I would do that with a loop, and use the FIELD() function and macros, instead of naming each field.

>I have to work with a file that has 164 fields. I know: it needs normalization, but this is the government - we don't have time for efficiency!
>
>Is there an easy way to compare two records within the same file? I'd like to just say something like "IF Rec#1 = Rec#2 Do Something" - is this possible?
>
>Or will I have to compare them one field at a time?
>
>Thanks!
>
>\/\/\
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform