Home » SQL & PL/SQL » SQL & PL/SQL » multiple rows to single (10g)
multiple rows to single [message #448525] Wed, 24 March 2010 00:15 Go to next message
beetel
Messages: 96
Registered: April 2007
Member
I have records:
owner    company
A           X
A           Y
A           Z
B           X
B           Y
C           X



owner    companyX   companyY   companyZ
A            1          1          1  
B            1          1          0
C            1          0          0


How do I write the SQL?
Re: multiple rows to single [message #448526 is a reply to message #448525] Wed, 24 March 2010 00:17 Go to previous messageGo to next message
bonker
Messages: 402
Registered: July 2005
Senior Member
Search for Pivot in this forum.
Re: multiple rows to single [message #448539 is a reply to message #448525] Wed, 24 March 2010 00:46 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you post a working Test case: create table and insert statements along with the result you want with these data then we will work with your table and data.


Regards
Michel
Tell me and I'll forget; show me and I may remember; involve me and I'll understand
Previous Topic: using clob instead of varchar2
Next Topic: Trigger to move records to history
Goto Forum:
  


Current Time: Sun Dec 04 12:38:43 CST 2016

Total time taken to generate the page: 0.05477 seconds