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().
>Here is the select:
>
SELECT MIN(Who_Na) as Post_Na FROM Dok1 WHERE Td=38 ;
>AND Dok1.D>o_Us.Otchet_d ORDER BY 1 INTO CURSOR Postavshik READWRITE
>
>When the select finds no matching records in the base table (Dok1) it still returns a result set with one record which contains the null. I see no reason why would one get something out of nothing.
>Anyway, is there a universal way to not allow this happen? I had to make the cursor ReadWrite and then to
>Replace all Post_Na with Nvl(Post_Na, '') && a kludge!
>
>The number of my selects with aggregate functions is forbiddingly large.
>Until your answer comes i will try not to think about the amount of code to dig thru.
>
--sb--