Wednesday, 11 September 2013

Displaying values one above the other instead of in the same line which belong to the same row

Displaying values one above the other instead of in the same line which
belong to the same row

I have a row in which two different teams are displace with their ID and
name.I want to display them in a dropdown.For that I need to display them
in a Format which is one above the other.THis is my query and the Image is
the current result I am getting..
SELECT Match_Schedule.Match_Serno as 'Id', FirstHomeTeam.Serno as
'HomeTeamID', FirstHomeTeam.Team_Name as 'HomeTeam',SecondHomeTeam.Serno
as 'AwayTeamID',SecondHomeTeam.Team_Name as 'AwayTeam'
FROM Match_Schedule
INNER JOIN Team_Detail AS FirstHomeTeam ON Match_Schedule.HomeTeam =
FirstHomeTeam.Serno
INNER JOIN Team_Detail AS SecondHomeTeam ON Match_Schedule.AwayTeam =
SecondHomeTeam.Serno
where Match_Serno=436
The result I get is
But the result I want is.
Thank you.

No comments:

Post a Comment