هم دانشگاهی
پنج شنبه 27 تیر 1392, 18:48 عصر
سلام
برای گروه بندی اطلاعات در موقع select به این شکل عمل کرده ام
CREATE PROCEDURE dbo.getAllCourses
AS
BEGIN
SELECT AllCourses.cGroup, AllCourses.cTitle
FROM AllCourses
GROUP BY AllCourses.cTitle
END
ولی این پیغام داده میشود:
Column 'AllCourses.cGroup' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
لطفا راهنمایی فرمایید
برای گروه بندی اطلاعات در موقع select به این شکل عمل کرده ام
CREATE PROCEDURE dbo.getAllCourses
AS
BEGIN
SELECT AllCourses.cGroup, AllCourses.cTitle
FROM AllCourses
GROUP BY AllCourses.cTitle
END
ولی این پیغام داده میشود:
Column 'AllCourses.cGroup' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
لطفا راهنمایی فرمایید