>hi mike, thanks for your reply but it only gives me one column-
count. i'd like my cursor to have 3 fields each for value status.
>
>any more help?
How about this:
select;
sum(iif(status=1, 1, 0) as Cnt1;
sum(iif(status=2, 1, 0) as Cnt2;
sum(iif(status=3, 1, 0) as Cnt3;
from MyTable;
into cursor Temp
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)