For example I have two tables. The first table is student while the second table are the courses that the a student is taking. How can I use a select statement so that I can
Are you using 2005 or 2008? If so, then lookup the PIVOT comand. It should be more efficient than a function with a cursor.