I have 3 text files each of which contains a list of 20 items. A new column will be added per new day.
I'd like to display these items in a spreadsheet or spreadsheet type layout with each column adjacent to the next.
Spreadsheet output like:
10-28-09 10-29-09 10-30-09
data1 data2 data3
data1 data2 data3
data1 data2 data3
I'm thinking of arranging the data in a mysql database, and execute a query to simply the process, however I can't figure out how to do a few things.
I can arrange the data like this:
DB schema; fields: varchar (50)
Columns name = date: 10-30-09 ( mon - fri);
The query would be simple then: "SELECT * FROM table1"
The data needs to expand horizontally so a new column needs to be created by day.
If I was to arrange the data by date like this, I'm not sure what the query would be to get the output into dated columns:
id name date
1 data1 10-28-09
2 data1 10-28-09
3 data1 10-28-09
4 data2 10-29-09
5 data2 10-29-09
6 data2 10-29-09
7 data3 10-30-09
8 data3 10-30-09
9 data3 10-30-09
I was thinking of adding a sort column and increment it 1-20 for all rows per date, but then you would need to join on every date somehow, again the output would be:
10-28-09 10-29-09 10-30-09
data1 data2 data3
data1 data2 data3
data1 data2 data3