kumar_kisna
Newbie
Points: 1
More actions
December 9, 2007 at 8:21 pm
#181959
hello friends ...
can u help me in a query....
i have a table having two columns no , name
data is like
1 A
2 B
3 C
write a query that outputs the result as
A,B,C i.e. in horizontal manner .
Steve Jones - SSC Editor
SSC Guru
Points: 740271
December 9, 2007 at 8:28 pm
#758439
This is a cross tab query.
You need to do something like.
select a.name
, b.name
, c.name
from Mytable a
inner join myTable b
inner join Mytable c
where a.no = 1
and b.no = 2
and c.no = 3
You need some way to determine which rows you are selecting. There is no easy way to do this.
It's better left to a client processor, like Reporting Services or an application
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply