Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing entire record
Message
From
12/10/1999 13:54:39
 
 
To
12/10/1999 09:01:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00275358
Message ID:
00275538
Views:
22
>I have been directed to generate a special table from an existing table. Each record has a year value in it. The new table should display one record with a year range (e.g. Beg_year field and End_year field) if all fields except year are identical. I have done this fairly easily but I suspect there may be a better method.
>
>With the table indexed appropriately, I loop through the database and compare the fields from one record to the next and store the year values in appropriate
>variables. If there is a change in any field other than the year field, then
>I write a record to a second table with the year range and other values.
>
>The comparison of one record to the next is fairly burdensome. Is there a way to compare entire records more easily? Is there an entirely different method that would be more effective?
>
>Thanks.

I would probably do something with SQL like Dore suggested, but for another idea, you could scatter each of the records to objects, and use COMPOBJ()...
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform