Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding expressions in the view designer
Message
 
 
To
08/08/2001 22:19:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00541561
Message ID:
00541652
Views:
24
This message has been marked as the solution to the initial question of the thread.
>OK Trey. Thanks! We are getting somewhere , now:
>I have this code:
>SELECT schedule.teacher, COUNT(*) AS Free;
> FROM acdatabase!schedule;
> WHERE status = "Free";
> GROUP BY schedule.teacher
>
>So far this works fine, but, where do I add the other 'counts' like
>where status="Captured", where status="Semifree" etc.?
>I need four different statuses counted.
>Thanks in advance.
>Ulises
SELECT schedule.teacher, sum(iif(status='Free',1,0)) AS Free, ;
 sum(iif(status='Semifree',1,0)) AS SemiFree, ;
 sum(iif(status='Captured',1,0)) AS Captured ;
 FROM acdatabase!schedule;
 GROUP BY schedule.teacher
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform