Page 1 of 1

How can we get the record like "Multi scope"?

Posted: Sat Jun 02, 2007 5:07 pm
by dutch
I've used Clipper5.2/FW2.5/Comix.

I would like to scope the databse by cmxSetScope(..,..) but some records is not the continue records.

example
-----------
Index on type+upper(name) tag ....
Type Name
----- --------------------
A John
A Jim
B Jonatan
B Sim
C Jane

How can I use scope to get all name with "J" from above index by do not use array, because the record is greater than 100,000 records.

Regards,
Dutch

Re: How can we get the record like "Multi scope"?

Posted: Sat Jun 02, 2007 5:12 pm
by Enrico Maria Giordano
You can't. Just create an index on upper(name) and use it to set a scope on "J".

EMG

Posted: Sat Jun 02, 2007 5:18 pm
by dutch
Dear Enrico,

I have 12 index tags with starting by "Type". If I create new set of index it means 24 index tags. I try to use cmFilter() but it is a little bit slow. Can I have another solutions.

Regards,
Dutch

Posted: Sat Jun 02, 2007 5:24 pm
by Enrico Maria Giordano
No, sorry.

EMG

Posted: Mon Aug 06, 2007 8:51 am
by avista
What do you think about something like this ?

for i = 65 to 90
cKey := chr(i) + "J"
seek cKey
do while left(name,1) = "J"
....
enddo
next

Best Regards,

Solution to almost all your indexes.

Posted: Mon May 26, 2008 10:19 am
by HunterEC
Dutch:

Why don't you index on Name and create bitmaps for the Type field ?
You will have just one index and the same number of bitmaps as of types.
You'll reap the benefits of faster processing and less index maintenance. The only overhead (small) is when you add/update records that you have to update the bitmap for the particular type.

Remember to update / create the bitmaps when re-indexing or indexing your files.