Link to home
Start Free TrialLog in
Avatar of rgn2121
rgn2121Flag for United States of America

asked on

Sql Server 2005, Convert column to rows

I have a query that returns me data like what I have below...
Temp1_TS                                         Temp2_TS
NULL                                             2011-11-01 18:08:59.883
2011-11-02 03:01:45.843            NULL

I would really like to have:
Temp1_TS                                         Temp2_TS
 2011-11-02 03:01:45.843               2011-11-01 18:08:59.883


I tried using Coalesce(Temp1_TS, Temp2_TS), but that gives me a single column with 2 rows.  I need a single row, with 2 correctly named columns.

thanks,
rgn
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgn2121

ASKER

this is before the coalesce correct?
Avatar of rgn2121

ASKER

Thanks!  I will always only have 2 columns, not possible about rows.  I will have to look into that...
Avatar of rgn2121

ASKER

Sorry, I meant, "Not sure about rows.."