Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
stonebreaker
Yak Posting Veteran
92 Posts |
Posted - 2007-10-09 : 16:24:35
|
I need to convert an excel matrix into a table. Currently, the data consists of months going across the top and business names going down the left side. Each business name has three rows of data per monthly column, such that there are three numbers in the january column, three in the february column, etc. etc.I want to convert to a table that has five columns, the business name, date, and the three data columns.Any help would be greatly appreciated. As of right now I'm staring at keying in about 2000 rows of data by hand. |
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-10-10 : 06:48:02
|
Have a look at the Pivot Transformation.Mark |
 |
|
stonebreaker
Yak Posting Veteran
92 Posts |
Posted - 2007-10-10 : 10:54:44
|
No good - first thing I thought of. The data was originally entered in this form, so I can't "de-pivot" it. |
 |
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-10-11 : 06:07:39
|
I've clearly missed the point, as it sounded to me like you wanted to pivot this data. Perhaps it would help if you posted some example data and your desired result.Mark |
 |
|
stonebreaker
Yak Posting Veteran
92 Posts |
Posted - 2007-10-12 : 15:28:47
|
....................Jan 05.....Feb 05.....Mar 05company 1 value 1..........2345.76.....3214.23.....6785.01 value 2..........9856.09.....4367.77.....4434.32value 3..........9586.88.....9586.43.....1123.43company 2value 1..........2345.76.....3214.23.....6785.01 value 2..........9856.09.....4367.77.....4434.32value 3..........9586.88.....9586.43.....1123.43company 3value 1..........2345.76.....3214.23.....6785.01 value 2..........9856.09.....4367.77.....4434.32value 3..........9586.88.....9586.43.....1123.43(I just cut & pasted the values, but you get the idea.) |
 |
|
|
|
|