>Edward,
>
>My conditions are s_or_type = type1 and s_or_type = type2 from the temp alias not the cursors. the thing is that my SQl statements in opther cases get really picky as the conditions get more in-depth. Example:
>
>SELECT ass_l_ata,s_or_type FROM temp ;
>INTO CURSOR cleared ;
>WHERE s_status = 'Cleared' AND mnemonic = gcProject ;
>AND ass_l_grp = gcGroup AND ass_l_dept = gcDeptNo;
>AND ass_l_date BETWEEN gdStartDate AND gdEndDate ;
>ORDER BY ass_l_ata
>
>lnClearedCount = RECCOUNT()
>
>SELECT ass_l_ata,s_or_type FROM temp ;
>INTO CURSOR outstanding ;
>WHERE mnemonic = gcProject ;
>AND ass_l_grp = gcGroup AND ass_l_dept = gcDeptNo ;
>AND ass_l_date BETWEEN gdStartDate AND gdEndDate ;
>AND NOT s_status = 'Cleared' ;
>ORDER BY ass_l_ata
>
>lnOutstandingCount = RECCOUNT()
>
>Perry
So what? Whatever conditions you have in SQL-Where clauses, you may use the same ones as COUNT FOR clauses. Nothing prevents you to use SQL, if you like it. It will yield the same result with probably the same speed. Just remember, that _TALLY will already return number of records in SQL-output, i.e. you don't need in RECCOUNT().
Edward Pikman
Independent Consultant