Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

denormalise SQL command

select d.StudentId, d.Name, d.Course, r1.result as Term1Result, r2.result as Term2Result
from StudentDetails d
left join StudentResults r1 on d.StudentId = r1.StudentId and r1.term = 1
left join StudentResults r2 on d.StudentId = r2.StudentId and r2.term = 2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #denormalise #SQL #command
ADD COMMENT
Topic
Name
1+2 =