Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The best way to use a portion of a field for indexing
Message
De
05/02/2005 21:47:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/02/2005 10:45:47
Steven Dyke
Safran Seats USA
Texas, États-Unis
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 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00975802
Message ID:
00984259
Vues:
24
>I am hung up on an index again and need some help with this post you made to me about AllTrim in an index.
>
>My Index is set on employeenumber+DTOC(weekDate)+JobNumber.
>
>The data in this fields is variable length.
>
>My Select statement is
>
>Select * From ntimetbl Where emp1no+DTOC(wend)+jobno == checkthisentry InTo Cursor myVerifySingle
>
>This will not work unless I use
>Select * From ntimetbl Where AllT(emp1no)+DTOC(wend)+AllT(jobno) == checkthisentry InTo Cursor myVerifySingle
>
>Which I am not sure takes advantage of the index.
>
>Please help me to understand.

Make search expression fit to index signature (assuming your index: emp1no+DTOC(wend)+jobno):
Select * From ntimetbl ;
  Where emp1no+DTOC(wend)+jobno == ;
    padr(m.emp1no,fsize('emp1no','ntimetbl'))+dtoc(m.dVar)+m.jobno ;
  InTo Cursor myVerifySingle
PS:Dtoc(m.dVar) is dependant on current date setting. dtoc(m.dvar,1) would be safe.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform