This is my query. I have attached the output I am getting. How can I modify the query to get the userID and name only once.
SELECT C.ID, C.StudentID,c.ClassID, c.InstructorID ,c.TimeID ,(rtrim(U.UserFirstName)) + '' +
)) as UserName,
y)) as AttendenceDay FROM CLASSSETUP as C
LEFT OUTER JOIN USERDETAILS As U on C.StudentID=U.UserID
Where C.ClassID =15 order by UserName