SELECT DISTINCT (another question)

Eric Forget forgete at cafederic.com
Mon Feb 10 13:37:53 CST 2003


> on 2/10/03 7:49 PM, Eric Forget at forgete at cafederic.com wrote:
> 
>> I have another question with the same tables, with these data:
>> 
>> A   RecID   Name        ptr_b
>>   -----   -------     -----
>>   1       NameA1      1
>>   2       NameA2      1
>>   3       NameA3      3
>> 
>> B   RecID   Name
>>   -----   -------
>>   1       NameB1
>>   2       NameB2
>> 
>> 
>> With this query:
>> 
>>   SELECT RecID, Name FROM A WHERE ptr_b = 1
>> 
>> I got just:
>> 
>>   RecID   Name
>>   -----   ----
>>   1       NameA1
>> 
>> Why I do not get the "1 NameA2" and how can I get it? What it is weird is
>> that if query:
>> 
>>   SELECT RecID, Name FROM A WHERE ptr_b >= 1 && ptr_b <= 1
>> 
>> I got what I want:
>> 
>>   RecID   Name
>>   -----   ----
>>   1       NameA1
>>   2       NameA2
> 
> Eric,
> 
> Try rebuild index. Trash .ind file.

That corrected the problem. I know it have been talked a lot, but is there
anyway to know the index is trashed? Or can I be sure that if the
application have not crashed, the index will *always* be correct?

Éric 

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list