Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on char binary
Message
From
15/09/2004 02:01:02
 
 
To
13/09/2004 09:25:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00940995
Message ID:
00942257
Views:
21
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform