I have a table [CourseMaster] LIKE
CourseId CourseName
-----------------------
01 ABC
02 DEF
03 GHI
04 JKL
05 MNO
06 PQR
07 STU
And I have another table [StudentMaster] for Student Details LIKE
ROLLNO NAME ADDRESS
------------------------------
12345 RAM RAM ADDRESS
25695 HARI HARI ADDRESS
89685 JEFF JEFF ADDRESS
47896 DAISY DAISY ADDRESS
And I have another table [StudentCourseMaster] for Student Course Details LIKE
ROLLNO CourseId
-------------------
12345 01
12345 02
12345 06
25695 02
25695 06
89685 03
89685 05
89685 06
89685 07
47896 03
I am trying to fetch the result in below format, but I am not able make the join.
ROLLNO NAME ADDRESS Course
-------------------------------------------
12345 RAM RAM ADDRESS ABC,DEF,PQR
25695 HARI HARI ADDRESS DEF,PQR
89685 JEFF JEFF ADDRESS GHI,MNO,PQR,STU
47896 DAISY DAISY ADDRESS GHI
I have seen this example, but still not able to figure out.
Thank you and any valuable suggestion will be highly appreciate.