>on VFP9 you can simplified this ( and return a integer ):
>
>SELECT examcode,;
> descr, scode,;
> lcode, sec,
> SUM( CAST(res01 = "pass" AS I)) AS pass01, ;
>
>....
>
Fabio,
It doesn't look simplier to me and it's certainly harder to understand.
--sb--