Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on char binary
Message
From
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:
00941585
Views:
21
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


>Hello, gentlemen.
>Upon further investigation it became clear that index has nothing to do with this.
>I've made the tables free and indexless.
>Cs1.dbf - parent table, PK C(16) NoCPConvert - primary key
>Cs2.dbf - child table, Cs1_pk C(16) NoCPConvert - foreign key
>
>Select * from Cs1 left join Cs2 on Cs2.Cs1_Pk=Cs1.PK
>
>This query gives correct result when CodePage=1251 (in config.fpw). If CodePage is changed then the query result is messed up. I wonder where NoCPConvert comes in...
>
>Have a good day.
>Kamil
>
>
>>hi Kamil,
>>
>>I think that it is the collating sequence of the index that is important. For binary fields the one to use is 'Machine'. Any other will cause trouble (Kamil = KAMIL = kamil)
>>
>>So, you may have to drop the indexes and recreate them with Machine collating sequence
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform