I want to to insert values in StudentReport table
I want a Query passing student name as parameter
insert into StudentReport
Name
Case When
StudentsDOB = SchoolStudentsDOB
AND
StudentsClass and SchoolStudentsClass
Then Result = Max(Exam Attempt)
Where Name=@Name
| Student Report | |
| | |
| Student Name | Result |
| John | 90 |
| Sam | 60 |
| Ram | 80 |