Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting records using select-sql
Message
From
26/08/2004 11:30:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/08/2004 05:19:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00936513
Message ID:
00936644
Views:
21
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform