Forgive my ignorance. I want to pass a few variables to a stored procedure,
ask the stored procedure to run three different SELECT statements (with a
single value each), then return the results of all three as one resultset to
be used with an ASP page.
My attempt is shown below. While this works in Query Analyzer, it does so
by returning three separate recordsets:
-----------------------------------------
CREATE PROCEDURE userSP_sysTeacherAttainMasteryCount
AS
SELECT COUNT(*) AS RedMasteryCount
FROM tblProgress INNER JOIN
tblEnrollment ON tblProgress.StudentID =
tblEnrollment.StudentID
SELECT COUNT(*) AS YellowMasteryCount
FROM tblProgress INNER JOIN
tblEnrollment ON tblProgress.StudentID =
tblEnrollment.StudentID
SELECT COUNT(*) AS GreenMasteryCount
FROM tblProgress INNER JOIN
tblEnrollment ON tblProgress.StudentID =
tblEnrollment.StudentID
GO
---------------------------------------
Any ideas?
Thanks,
--Gary