PIVOT of data
| От | Srikanth Rao |
|---|---|
| Тема | PIVOT of data |
| Дата | |
| Msg-id | 20010314222916.11494.qmail@web6305.mail.yahoo.com обсуждение |
| Ответы |
Re: PIVOT of data
|
| Список | pgsql-sql |
Hi,
I have a table like this: location | numbrochures | marketing
-----------------------+--------------+-----------101 Asheville, NC | 4 | NEWS101 Asheville, NC |
1 | TV101 Asheville, NC | 3 | RADIO101 Asheville, NC | 2 | OTHER101 Asheville, NC
| 3 | null101 Asheville, NC | 1 | TV102 'Charlotte', 'NC' | 1 | SIGN104
'Colfax','NC' | 5 | SIGN109 'Moyock', 'NC' | 1 | BROCHURE
(9 rows)
I want the headings to be like:
location | NEWS | TV | RADIO | OTHER | ........
How to get this done using sql for postgresql backend?
TIA,
Sri.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
В списке pgsql-sql по дате отправления: