Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collate - Index on Deleted() Tag DeletedTag Binary
Message
De
26/08/2005 16:04:06
 
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 9
Database:
Visual FoxPro
Divers
Thread ID:
01044347
Message ID:
01044428
Vues:
19
>Fabio,
>
>I think my problem does not have solution. BINARY INDEXES just work fine if you have all indexes in MACHINE collate.
>
>My problem is... The user wants to find someone that has the first name like "Jo" (it means Jose, José, João, João, Joana, etc)... So, I have to list it for him in the right order (GENERAL collate)
>
First, you have to known the GENERAL collate before:
Set Collate To "GENERAL"

? "ã"="a" && not equal
? "A"="a" && equal
Second:
BINARY INDEXES works on GENERAL collate,and it is evident.
LIKE uses MACHINE collate only, then you cannot use LIKE for a GENERAL collate match.

The solution is simple:
Clear

Set Deleted On
Close Databases All
CLOSE TABLES ALL

Set Collate To "GENERAL"

? "ã"="a" && not equal
? "A"="a" && not equal


Create Table MyTest (MyId I, Name C (50))

Insert Into MyTest Values (1,"Joao Bernardo")
Insert Into MyTest Values (2,"João Alberto")
Insert Into MyTest Values (3,"JoAo Gustavo")

* This use MACHINE
Select * From MyTest Where Name Like "Joa%"
SET ANSI OFF
* This use GENERAL
Select * From MyTest Where Name="Joa"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform