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 |
pyrrhus_finch
Yak Posting Veteran
51 Posts |
Posted - 2004-11-30 : 15:06:08
|
my data looks like this:year__month__events_location2004__Jul_____12____room22004__Jul_____2_____room32004__Jul_____5_____kitchen2004__Aug_____18____room 22004__Aug_____4_____lounge2004__Sept____8_____patio2004__Sept____3_____room2and i want it to come out looking like this somehow:______room2_room3_kitchen_lounge_patioJul_____12____2______5_______0_____0Aug_____18____0______0______4______0Sept____3_____0______0_______0_____8I'm stumped.Please help. Thanks whole bunch. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-01 : 08:20:35
|
You can do this with a cross tab. There is a cross tab query wizard that will get you started. You'll want to put the month on the row, the location on the column, and use FIRST, LAST, MAX, or MIN on the events for the pivoted value. You can modify it from there as needed. |
 |
|
pyrrhus_finch
Yak Posting Veteran
51 Posts |
Posted - 2004-12-01 : 18:27:16
|
Wow. Great. I never knew about the crosstab thing in Access. Saved me a ton of hack work.Thanks again. |
 |
|
|
|
|