Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use logical field (.f.) in a compound index
Message
De
22/06/2007 11:50:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
22/06/2007 11:48:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01235052
Message ID:
01235053
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>Greetings all,
>I am attempting to use a logical field name checkStub (.f., or .t.) in a compound index. The code requires the field to remain a logical fields: .f. or .t. I would like to sort in a compound index with a character field named vendCode. I tried:
>
> str(checkStub) + vendCode
>
>but that gives me "invalid type".
>
>Any ideas?
>
>thanks, vince

To combine several fields, you must normally convert everything to character type.

Here are two alternatives:
* Option 1
index on transform(CheckStub) + VendCode

* Option 2 - smaller index
index on iif(CheckStub, "1", "0") + VendCode
* or
index on iif(CheckStub, "T", "F") + VendCode
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform