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 |
simflex
Constraint Violating Yak Guru
327 Posts |
Posted - 2014-03-12 : 21:46:07
|
Hi,When I run the following query:SELECT ElectionName, Position, CandidateName, c.PositionId,CurrentOfficeHolder,AnswerType FROM Candidates c INNER JOIN Positions p ON c.PositionId = p.PositionId INNER JOIN Elections e on c.ElectionId = e.ElectionId WHERE c.ElectionId IN (2,3) GROUP BY Position, CandidateId, CandidateName,c.PositionId,CurrentOfficeHolder,AnswerType,ElectionName ORDER BY c.PositionIdI get the following results:GC Ball Member Jiim Fyre 7 NULL MGC Ball Member Katty Perry 8 NULL MCF Ball Member Justine Util 9 NULL MCF Ball Member Bill Johnson 10 NULL MCF Ball Member Ann Dawn 11 NULL MHow can I modify the code to show the results in the following format?GC BallJiim Fyre 7 NULL MKatty Perry 8 NULL MCF BallMember Justine Util 9 NULL MMember Bill Johnson 10 NULL MMember Ann Dawn 11 NULL MNotice GC and CF are ElectionNames.We would like to show each ElectionName just one, followed by associated results.Your help is greatly appreciated |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-03-12 : 23:25:19
|
This is presentation issue. Do it in your front end application KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|
|
|