Mary Phelps
2014-06-22 06:33:19 UTC
I have 2 tables
First table: StudentSubject with StudentId int, SubjectId int
StudentId SubjectId
1 2
1 3
1 6
2 8
2 6
Second table: StudentMarks with StudentId int, SubjectId int, StudentMarks decimal
StudentId SubjectId StudentMarks
1 8 10
1 3 23
1 6 46
2 8 49
2 6 50
I want to get those values from StudentMarks where studentid in both tables is same however subjectid is not same
For example from above data query should return the first row of data because in studentmarks table studentid 1 doesn't have subjectid 8 in studentsubjecttable.
First table: StudentSubject with StudentId int, SubjectId int
StudentId SubjectId
1 2
1 3
1 6
2 8
2 6
Second table: StudentMarks with StudentId int, SubjectId int, StudentMarks decimal
StudentId SubjectId StudentMarks
1 8 10
1 3 23
1 6 46
2 8 49
2 6 50
I want to get those values from StudentMarks where studentid in both tables is same however subjectid is not same
For example from above data query should return the first row of data because in studentmarks table studentid 1 doesn't have subjectid 8 in studentsubjecttable.