>Thanks Mike for your reply.
>
>That would give me the number of occurences by grouping. Unfortunately it's a little more than that. What we're trying to do is (within one statement) get conditional counts for ranges. For instance, one count if the field is from 0 - 9, another if 10 - 19, etc. without having to generate a grouping indicator in advance. Ultimately we are trying to create a report with columns meeting certain criteria.
You can use UDF:
Select getcolumn(field1) As cField1, Count(*) as Counter ;
From MyTable ;
Group by 1
Function getcolumn
LParameter nField1
Do Case
Case nField1<10
Return "A"
Case nField1>=10 and nField1<20
Return "B"
....
EndCase
Edward Pikman
Independent Consultant