Re: Equivalent of Get Next Extended to retrieve only unique keys?



Do you actually need the entire record, or can you get away with just
the Key Value? The usual way to implement what you are trying is to
use GetGreater calls repeated as frequently as needed. A GetGreater
with a GetKey Bias (+50) would give you just the key values, but
probably won't save you much in the way of round trip requests (though
it will save on the data transfer).

I cannot think of any way to do a "GG" on the GetNextExtended, though.
By its very nature, it is a GetNext function. If your level of
duplication is low, then perhaps you can do a regular GNE and filter
out the extra records. If you get TOO many duplicates in a row, you
can then do a GetGreater to skip the rest of the duplicates. The
code'll be ugly, to be sure...

Might be better off doing a simply SQL query:
SELECT DISTINCT(...) FROM ...
But you won't get Btrieve record positions from that type of query.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach@xxxxxxxxxxxxxxxxxxxx
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 07/2007 ***


Jason Gilbert wrote:

I'm writing a program that uses a Get Next Extended to pre-load
position information about records in a fairly-large database by
loading x number of records at a time. This works pretty well
performance-wise, except that I only want to retrieve unique keys
instead of every record. The filters on Get Next Extended can filter
on static values or on values within the record, but I don't see a
way to be able to filter on something like "greater than previous
record retrieved" or something like that. The alternative of looping
through the keys one at a time seems like it would be too slow.

Can anybody think of a way to achieve something like this?

.



Relevant Pages

  • Re: PATCH - InfiniBand Access Layer (IBAL)
    ... >> I don't see why a smarter client, or mail filter, couldn't do the same ... As are other people on lkml. ... > A filter can easily filter out duplicates but it can't magically ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: PATCH - InfiniBand Access Layer (IBAL)
    ... As are other people on lkml. ... A filter can easily filter out duplicates but it can't magically ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Managing duplicates with the advanced filter
    ... filter" to filter the list "in place". ... No criteria are needed. ... Y1 as the cell where the duplicates would be copied to and then I ...
    (microsoft.public.mac.office.excel)
  • Re: Merging two spreadsheets, avoiding duplicates?
    ... The email column C has no duplicates to filter or tag. ... i don't understand what criterion it uses to ...
    (microsoft.public.excel)
  • Re: excel duplicates problem
    ... that does is hide the duplicates - You can filter to another range and it ... What you are seeing as duplicates I would be 99% sure aren't. ... "Jason" wrote in message ... When I get to the advanced filter, ...
    (microsoft.public.excel.misc)