title: How do you code a pivot table in Delphi?
body: <p>I am simultaneously learning about databases (through Access), programming interfaces to db's (through Delphi), and linking the two (via MS's SQL)--so please forgive any newbie confusion here ... I'm using a teacher's gradebook as an example to help me learn. I understand the relationship between students and their assignment grades is many-to-many. I can set up the underlying tables and relationship, and I can query the underlying database. </p>
  
  <p>What I can't figure out is how to display/report students and grades the way it's typically done in, say, a spreadsheet--students in rows, assignments in columns, grades in cells--with the added point that assignments are added as a course goes on; one does not know all assignments when planning the database fields.</p>
  
  <p>One solution might be something equivalent to MS's pivot table concept. Is this easily done with Delphi? Does a simpler alternative exist? (Maybe make a separate table somehow with fields for student names and individual assignment names?) </p>