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 |
|
derrick_goi
Starting Member
6 Posts |
Posted - 2011-11-29 : 01:16:37
|
how should i do if i want the result come out with : |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-29 : 03:09:35
|
| hmm...sorry we cant see what result you're expecting------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
sureshkk
Starting Member
21 Posts |
Posted - 2011-11-29 : 08:31:53
|
| SELECT shiftid,[Cimpack System]+[FloorTrack System] [count], [Cimpack System] cimpack, [FloorTrack System] floortrackFROM( SELECT * FROM #test) pPIVOT( SUM(job) FOR [system] in([Cimpack System],[FloorTrack System])) a |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-29 : 11:10:39
|
| seeing data i think what you need is fuzzy grouping rather than normal group by as values are not exactly the same------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|