Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What are the best indexes to have for a filter ?
Message
De
12/01/2005 08:29:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00975956
Message ID:
00976348
Vues:
7
Did you you read my update to my last email? Anyway, I'll repeat and change my suggestion accordingly:

Why not combine Department, Section and Unit into one field (DSU)? So that

DSU='A1A' means Dept A Sect 1 Unit a
DSU='A1B' means Dept A Sect 1 Unit b
DSU='B1A' means Dept B Sect 1 Unit a
DSU='C5G' means Dept C Sect 5 Unit g
laCond(1)= 'A1A' &&Dept A Sect 1 Unit a
laCond(2)= 'A1B' &&Dept A Sect 1 Unit b
laCond(3)= 'B1A' &&Dept A Sect 1 Unit a
laCond(4)= 'B5G' &&Dept B Sect 5 Unit g

..More array elements
lcFilter=''
FOR x=1 to alen(laCond)
  lcFilter=lcFilter+'DSU='+UPPER(laCond(1))
  if x<alen(laCond)
    lcFilter=lcFilter+' OR '
  endif
ENDFOR
SET FILTER TO &lcFilter
>I'll try things out and then decide what to use based on the results. Thanks a lot to everyone. It was really helpful. You are the best guys
!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform