Hi,
I need to know how to pivot (This may not be the correct term) the resultset of a query.
EG. When I run:
use pubs
select au_lname, au_fname, city
from authors where au_lname in ('white','green')
I get the followig resultset:
au_lname au_fname city
Green Marjorie Oakland
White Johnson Menlo Park
But I want it in the form:
au_lname Green White
au_fname Marjorie Johnson
city Oakland Menlo Park
ie. I need to see the rows as columns and coumns as rows.
Can anyone assist please.
Thanks
TK
I need to know how to pivot (This may not be the correct term) the resultset of a query.
EG. When I run:
use pubs
select au_lname, au_fname, city
from authors where au_lname in ('white','green')
I get the followig resultset:
au_lname au_fname city
Green Marjorie Oakland
White Johnson Menlo Park
But I want it in the form:
au_lname Green White
au_fname Marjorie Johnson
city Oakland Menlo Park
ie. I need to see the rows as columns and coumns as rows.
Can anyone assist please.
Thanks
TK