>It's defined by SQL ANSI Standard that NULLs will be returned in such case. IOW, you'll get the same result from many other database like MS SQL Server, Oracle, e.t.c. You can revert to pre-VFP9 behavior by using SET ENGINEBEHAVIOR 80 but it'll afaect other aspects of SQL Engine as well.
>Other workarounds would be to delete the record after select if it contain NULLs only or wrap all MIN() into NVL().
>
Allow me to sum up.
A Select with an agregate function can potentially return a null record.
To deal with this feature one could
if _Tally<1 or (_Tally=1 and isnull(evaluate(field(1)))
endif
What do you think?
Kamil
A moment of silence is our cosmic reset button.