Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Index
Message
De
05/07/1999 10:51:00
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/07/1999 10:24:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00237479
Message ID:
00237487
Vues:
12
>How can I index on multiple feilds of a table?
>
>Feilds A and B in table Mytable, I want combination of A&B unique. Like A B
> 1 1
> 1 2
> 1 3
> 2 1
> 2 2
>If I index them individually it doesn't allow me to add more than one combination.
>
>
>Thanks in advance
>Gnana.
Sounds like they're integer fields :
index on bintoc(f1)+bintoc(f2)
is one way. This would keep your index key at 8 chars. While searching you would search again by bintoc() :
if seek(bintoc(Value1)+bintoc(Value2))
or
if seek(bintoc(Value1))
when looking all that begins with value1
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