I'm using MSSQL, and came up with this query to display the results I want.
select tutorgroup_name, count(borrower_tutorgroup_id)
from WBLS.dbo.Borrower left outer join WBLS.dbo.tutorgroup on
group by borrower_tutorgroup_id, tutorgroup_name
It shows the number of tutor group names (e.g. 7x, 8x...) and then the number of pupils in the specific group.
How do I modify the select statement so it will update a field called tutorgroup_total for each different tutor group with the count of number of pupils in the specific group.
Hope this makes sense... I have a headache lol
You want to run the update and the select in the same statement and still return the recordset? I don't think you can without a stored procedure. Why not just run the update statement after the select.
There are currently 1 users browsing this thread. (0 members and 1 guests)