>Cetin,
>
>>Pascal,
>>Works right in VFP5.0. 2 things I can think of :
>>1) There is another value same as deleted one and not deleted.
>>2) set deleted is off for session (scoped to current session)
>>Cetin
>
>It seems we have a different version VFP5.0. Mine is VFP5.0a. I can easily reproduce this problem on my machine :
>
>set deleted on
>select mytable
>delete all
>select * from mytable && result is fine : empty cursor
>select max(myfield) from mytable && bad result : single line cursor with a value
>
>I don't believe I'm doing something wrong or overlook something, do I ?
>
>Pascal.
Pascal,
YOU'RE RIGHT !!! I could reproduce it if field was of date or datetime datatype.
It doesn't behave that way in VFP6 or 7.
I'm afraid you should use old workaround :
select ... from ... where !deleted() and ...
This might make sense to have an index on deleted().
Cetin