Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering

Status
Not open for further replies.

soks2626

Programmer
Jul 3, 2002
22
US
Hi peoples:
Got another question about filtering. I understand that with setRange you can filter everything but a particular value (such as 15 from an indexed table). I was wondering if instead of filtering everything but, you could filter nothing but. I want to filter none of the records except for records that have a "data entry errror" completion type (there are 13 other types).

I want to try to stick with filters and not run queries because some of these tables can get pretty big. Thanks!

-Alex
 
Alex,

The easiest way to do this is to add an A1 or Shortint field for filtering. Then run a quick script, scan loop, changeto query, or whatever you want to set all records that you don't want to see to "1". Set the rest to "0".

Finally, create a secondary index on this filtering field (which is why you didn't make it a Logical).

At this point, you can filter for everything but "Data Entry Error"

Another trick is to use a lookup table for the types and to control the values such that the ones you most frquently don't want to see can be easily ranged out of a match. For example, if Data Entry Error = -1, then you setRange on all positive values.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top