TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Amofa Baffoe
NA
1
0
Multiple Table Joins
Apr 16 2006 1:02 PM
I have the following code which works fine for me in MySql, but retrieves no tuples in SQL Server 2005. I am dealing with three tables. I want to retrieve information on students, their modules, exam marks gained in that module and a sum of marks gained in all continuos assessments of that module. So for every module that the student does, the various continuos assessments that he/she did in that module, will be added up against the module. Any help?
SELECT s.id, f.moduleid, f.exammark, SUM(c.mark) from students s
LEFT JOIN finalexamtab f
ON s.id = f.studentid
INNER JOIN contassessment c
ON s.id = c.studentid and f.moduleid = c.moduleid
WHERE s.major = 'CASE4'
GROUP BY s.id, f.moduleid, f.exammark;
Reply
Answers (
1
)
Represenation of special characters
equalent datatypes for "clob" and "blob" in sqlserver