Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count
Message
From
21/03/2000 13:13:47
 
 
To
21/03/2000 12:36:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Count
Miscellaneous
Thread ID:
00348469
Message ID:
00348497
Views:
23
Tyler,

>select course.courseid, count(assignment.courseid) as qty;
>from course left join assignment on course.courseid = assignment.courseid;
>where assignment.courseid = thisform.fancyfield1.text1.value;
>into cursor classi
>qty = alltrim(str(classi.qty))
>
>This worked for the one course:the one displayed on the form. Now when I get rid of the where statement, it doesn't count the assignments for each course. I only get one course with a total.

You need to add
GROUP BY course.courseid
after the "into cursor classi ;"
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform