Hi ,
is this correct query for access database..

string findrecord = "SELECT  s.test_no, COUNT(s.test_no) AS totalQ,(SELECT        COUNT(s.que_id) AS CorrectS FROM            Testmark AS t INNER JOIN   StartTest AS s ON s.test_no = t.test_no AND s.que_id = t.que_id AND t.ans = s.ans  and t.test_no = '" + GlobalMember.TestNumber + "') AS CorrectS, (SELECT        stud_id FROM            Registration_master) AS stud_id FROM            Test_Detail AS s INNER JOIN   Testmark AS t ON s.test_no = t.test_no WHERE        (s.test_no = '" + GlobalMember.TestNumber + "')GROUP BY s.test_no";

Error is syntax error in select stt. i.e after count

Can anybody help me ...

6 Years
Discussion Span
Last Post by thines01

Does the student ID in Registration_master not need a where clause?
What I'm asking is: How are you keeping track of a student to a test?
The other tables either don't have student IDs or the Registration_master does not have test_ids.

Edited by thines01: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.