Create Cursor TestCount (Field1 I Null, Field2 C(10) Null) Insert Into TestCount Values (1, "One") Insert Into TestCount Values (1, "One A") Insert Into TestCount Values (1, .Null.) Insert Into TestCount Values (.Null., "Null") Insert Into TestCount Values (2, "Two") Select Count(Distinct Field2) ; From TestCount ; Where Field1 = 1 && 2 Select Distinct Field2 ; From TestCount ; Where Field1 = 1 && 3 rows