Page 1 of 1

Approximate Lookup

Posted: Fri Nov 28, 2003 5:42 pm
by Terry_Price
I understand that the "Approximate Lookup" makes a relational match that is equal to or greater than the link field in the controlling table. Is there a way to make that equal to or less than? I need the match to be the record below the link field, not the record above. Any help would be greatly appreciated.____THANKS__Terry

=> RE: Approximate Lookup

Posted: Sat Nov 29, 2003 4:51 pm
by kfleming
I cannot think of a good way to get there.____Kathleen__R&R Support

==> RE: Approximate Lookup

Posted: Mon Dec 01, 2003 11:13 am
by Terry_Price
Since I can^t go backwards, is there a way to capture the "relative" position of a record based on the current index? I know how to capture the record number, but that is not useful. But the "relative" position may help me find the record preceeding it.____JUST HOPING!!!____THANKS__Terry

===> RE: Approximate Lookup

Posted: Mon Dec 01, 2003 2:31 pm
by kfleming
One roundabout thing that you could do is to create a second report that uses that related table and corresponding index as the master file/index.__You could then create a calculated field with expression RECNO()that would give you the current position and a second calculated field with the expression RECNO(alias) where alias is the alias name of the master file. This gives you the physical record number from the file.__You then add the fields that form the index key and export the whole lot to a DBF.__You then do the approximate lookup to this new table using the key fields. You then create a calculated field that is the exported RECNO field minus 1. This calc is then used as a link to the same table. When we find that record we have the key for the previous record as well as its record number from the real file so if you need more fields from the real guy you can build a relation based on the RECNO(alias) field.__Sort of kludgy but if your files are reasonably small and static this would get you there.______Kathleen__R&R Support