Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing Records Within the Same File
Message
From
22/07/1999 11:09:49
 
 
To
22/07/1999 10:59:54
Vernon Moeller
Texas Adjutant General's Department
Austin, Texas, United States
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00244733
Message ID:
00244739
Views:
18
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!
Previous
Reply
Map
View

Click here to load this message in the networking platform