Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing Records Within the Same File
Message
From
22/07/1999 11:20:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
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:
00244750
Views:
16
>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!
>
>\/\/\
You would need a comparing function then.
function IsSame
parameters tcTable, tnRec1, tnRec2
select * from (tcTable) ;
 where recno() = tnRec1 ;
union ;
select * from (tcTable) ;
 where recno() = tnRec2 ;
into array myArray
return iif(alen(myArray,1) = 1, .T., .F.)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform