fetch next from cursorName
into @StudentId,@CourseCode1,@CourseCode2 ,@CourseCode3,@CourseCode4, @CourseCode5,@CourseCode6,@CourseCode7, @CourseCode8, @CourseCode9,@CourseCode10,@CourseCode11,@CourseCode12
end
close cursorName
deallocate cursorName