Create an Excel spreadsheet. Import the raw data, structured as-is, into a worksheet. Select all the relevant columns. Go to Data -> "Pivot Table and Pivot Chart Report". Click "Finish". From the "PivotTable Field List", drag the respondant ID into the box labeled "Drop Row Fields Here", then drag question ID into the box labeled "Drop Column Fields Here".
Voila. -JF > -----Original Message----- > From: Jeffrey Goldberg [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 19, 2005 1:44 PM > To: Brent Baisley > Cc: mysql@lists.mysql.com > Subject: Re: Turning tables on their side > > [mailed and posted] > > On Oct 19, 2005, at 3:34 PM, Brent Baisley wrote: > > > The person you inherited from formatted the data correctly in my > > opinion. > > I agree. > > > What you are trying to do is store the data as you see it, which is > > rarely a normalized data model. Your presentation layer > should handle > > the formatting for the user. > > I'm sorry that I didn't make the question clear. My goal is > to export an MS-Excel file that looks like my target. I do > not wish to change how things are done in the DB. The > end-users will want a spreadsheet like that for doing their > analysis. Not for queries. > > I'm using phpmyadmin which will do an Excel export of a table > for me. I just need to create the temporary table long > enough to do the export. > > -j > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]