>>>I also don't think he can make an updatable view of this (this request left me puzzled last night). I just wanted to show a way to add the extra count column to the original query in VFP6.
>>
>>OK setting updatable view aside, still I can't see how that query would do what he wants?
>>Cetin
>
>This query is returning one record where either Master_IND = 'Y' or we don't have Master_ID = 'Y' so we grab any other record. It also gives us the count of records per Master_Code satisfying these requirements.
Are you saying it works if you make a complex explanation to a complex SQL:) I mean how would you get a result using that query other than 1 for the reccount. You could instead simply say then:
select MAX(Master_Ind) as master_ind, Master_Code, 1 as reccount ;
from myTable ;
group by Master_Code
Cetin