Sort/select processing when sorting by associated fields
Boaz Bezborodko
boaz at mirrotek.com
Thu Jan 31 06:01:46 PST 2008
Kenneth Brody wrote:
> Quoting Boaz Bezborodko (Wed, 30 Jan 2008 12:55:36 -0500):
>
>>
>>> Date: Wed, 30 Jan 2008 12:36:50 -0500
>>> From: Kenneth Brody <kenbrody at bestweb.net>
> [...]
>>> You can verify this by creating a simple file. For ease of setting
>>> this up, create a file with five instances of A1, and add 5 records
>>> filling in only 3 instances for each record. Then, create an output
>>> sorted on A1. Finally, create a sort/select processing:
>>>
>>> mesgbox "Record " < @rn { "\n at AF = " < @af { "\nA1 = " & A1
>>>
>>> When you run the output, you will see that your processing is run
>>> 15 times -- one time for each non-blank instance of A1.
>>>
>> How does doing the Sort/Selection process on an indexed NON-associated
>> field affect this? I'm asking since my approach is obviously messing
>> things up some since it only ever goes through the first record once
>> despite how many associated fields there are.
>
> Take my example, add an additional non-associated field. Build an
> index on this field, and run your output with the appropriate "-i"
> flag.
>
>> BTW, I found a workaround that I am satisfied with for now. Instead of
>> jumping to the first instance in the index of records I want to choose,
>> I pick a spot a little before it. So if 'ba' holds the start date of
>> the selection set based on index 'O', the line looks like this.
>
> Unless, of course, you are looking for the very first date in the file.
>
> [...]
>
Would a solution to this whole issue (one that would include all
instances) be to index on the date field (20 in my example) AND the
associated field?
Boaz
More information about the Filepro-list
mailing list