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 |
|
Nesu
Starting Member
15 Posts |
Posted - 2007-09-06 : 12:16:00
|
| I have a query to produce a list of indicators that are by employee for each of the companies locations.The indicators I produce are all in one table and when I produce them, they go down the page. What I'm trying to do is make the indicators go across the page.ie, ind1 ind2, ind3, ... indxI have included the code below that produces the indicators that go down the page in the outpage window, and could use some help in transposing them across the page so that i get each employees results acrros the pageThanks very much.Nesu.select d.locatcode, d.locatname, c.deptcode, c.deptname, b.employeecode, a.indicator_id, a.numerator, a.denominator, a.points from indicators as ainner join employee as b on a.emp_id = b.emp_idinner join deptnode as c on b.dept_id = c.dept_idinner join locatnode as d on c.locat_id = d.locat_idleft outer join indicator as e on a.indicator_id = e.indicator_idinner join indicator_group as f on e.indicator_group_id = f.indicator_group_idwhere f.indicator_group_id = 1order by 5, 6, 3 |
|
|
Kristen
Test
22859 Posts |
|
|
Nesu
Starting Member
15 Posts |
Posted - 2007-09-07 : 05:42:40
|
| Thanks for the link.I created the procedure and then executed it on the code as written above. It doesn't seem to return the rows as I wanted.I still get, ignoring the location and dept for a moment,employeecode indicator_id numerator denominator points1 1 3 3 51 2 2 6 31 3 4 5 8when what i was hoping for wasemployeecode indicator_id numerator denominator points indicator_id numerator denominator points1 1 3 3 5 2 2 6 3so each employee only appears once with all their results in a row.I'm really not sure what to do and could really use help if this is possible to do. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-09-07 : 05:45:40
|
| Can you post the parameters you used for the Cross Tab Sproc pleaseKristen |
 |
|
|
|
|
|
|
|