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 |
GMANAFIP
Starting Member
13 Posts |
Posted - 2008-12-22 : 09:05:52
|
How do I get a dynamic result set horizontal and vertical? I need to query the database to pull out several users and their accounts they are responsible for. Do I use pivot tables? The table should look similar to this:John Fred Sue1 5 62 21 204 33 44Any ideas?Thanks |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-12-22 : 09:10:51
|
yes you can pivot the data.Vertical data is always "dynamic" by default if you do group by.However you need to code for "dynamic" columns.There are pleny of examples here at SQLTeam. E 12°55'05.63"N 56°04'39.26" |
|
|
GMANAFIP
Starting Member
13 Posts |
Posted - 2008-12-22 : 10:08:31
|
Where are the examples located? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-12-22 : 10:16:18
|
Type "dynamic pivot crosstab" in search text box.Press Search. E 12°55'05.63"N 56°04'39.26" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|