Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on char binary
Message
 
 
À
13/09/2004 09:25:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00940995
Message ID:
00942257
Vues:
23
Hello Gregory
Here is what i did.

Tryed your code in the "right" CodePage.
All is fine.

Restarted VFP8.0 with the "wrong" CodePage.
Tryed your code.
Result messed up.
Tryed joining tables using Where - result messed up.
Hard to explane. If string A equals string B in one codepage the same should be true in any other codepage. So, remaining in the "wrong" CodePage, i set record pointers to appropriate records in the parent and the child tables and issued ?Cs1.PK==Cs2.Cs1_PK and it returned true! So its something within the query...
Then
select * from cs1 into cursor cs1a nofilter
select * from cs2 into cursor cs2a nofilter
Select * from Cs1a left join Cs2a on (Cs2a.Cs1_Pk==Cs1a.PK)
result OK!
So its something within ...
I can email you those tables by the way.
All the best.
Kamil


>hi Kamil,
>
>Would you try the following, assuming the two fields are binary
>
>
>(1) make sure that PK and cs1_PK are char binary (ie with NOCPTRANS)
>
>(2)
>set collate to 'machine'
>Select * from Cs1 left join Cs2 on (Cs2.Cs1_Pk==Cs1.PK) && note the ==
>
>if the above gives the result you want, then you can add an index with collating sequence = machine
>
>see also the help for SET COLLATE
>
>!!!!!! the == is evaluated taking into account the current collating sequence. If an index with the current collating sequence is there, it will be used. Otherwise it will not
>
A moment of silence is our cosmic reset button.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform