On Sun, 2006-08-13 at 15:53 -0700, Steffan A. Cline wrote:
> I am in a situation where I have say 1 column called "attribute" I need and
> the result set is 3 rows. i.e.
> ROW 1 - Mechanic
> ROW 2 - Carpenter
> ROW 3 - Plumber
> I want to have the rows returned as one row
> Such as
> ROW 1 Mechanic, Carpenter, Plumber
> Something like a literal join would be beautiful such as :
> ROW 1 Mechanic, Carpenter and Plumber
Not sure how your row are. is it really marked as Row1/Row2/Row3?
If yes, you can use a case expression.
case when row=row1 then row else null end as mechanic ,
case when row=row2 then row else null end as carpenter,