Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>>>>It's interesting to see all the different solutions that people are recommending. However, NOTHING will work. Since you say this is a legacy table, you can only get two values. .T. and .F.
>>>>>>
>>>>>>It's not totaly true. In the browse you can see T, F and empty values in the logical field. ISBLANK() function would return .T. for the empty values on record per record processing. Unfortunatelly, it doesn't work properly in SQL Select.
>>>>>
>>>>>A logical can only store 0 or 1. Having a "blank" value doesn't make sense. The ISBLANK() function IMO is the one that's not working properly. I agree with Craig that the only way to get another value is to have the field be NULL. Again, IMO.....
>>>>>
>>>>>Tom
>>>>
>>>>Ah, but what about the other 7 bits in that byte that VFP uses to store a logical?
>>>>
>>>
>>>7 bits? Internaly foxpro stores logical as long integer. :)
>>
>>-- to maintain word boundaries in memory processing?
>>
>>Just checked in a table and it looks like each logical occupies only a byte in the file. I guess that's what I had pictured. But, that's an interesting transformation.
>>
>
>Yes, it's one byte in the table, characters 'T' or 'F'. I was talking how VFP keeps logical value internaly in the memory. Actually it's even more because each variable is represented by an Expresion's Value structure wich is about 36 character long (not sure). A logical value's stored in one of the elements of this structure which is long integer.
Interesting... Although, the only uses I can think of for that information are dangerous!
Jay
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement