Home » SQL & PL/SQL » SQL & PL/SQL » concatinating similar rows
concatinating similar rows [message #401857] Wed, 06 May 2009 12:42 Go to next message
sninii@yahoo.com
Messages: 2
Registered: May 2009
Junior Member
Hi All

I have table like the following .......................

*Column1*-----------*Column2* -----------*Column3*-----------*Column4*_

123 -----------bep-----------feep-----------greep
123 -----------bep-----------feep-----------max


how do i get the output in this way.....................

*Column1*-----------*Column2* -----------*Column3*-----------*Column4*_

123 -----------bep-----------feep-----------(greep * max)

the similar row shd be shown in one way and the rows tat differ shd be concatinated with "*" in middle.

I tried all possible ways but not sucessful. Any help is greatly appriciated


Regads
Snimi

Re: concatinating similar rows [message #401858 is a reply to message #401857] Wed, 06 May 2009 12:50 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Seaech for "pivot". It is a very very FAQ.

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Always post a working Test case: create table and insert statements along with the result you want with these data.

Regards
Michel
Previous Topic: how to check whenever package got modified
Next Topic: Help with an Index
Goto Forum:
  


Current Time: Sun Dec 04 18:55:33 CST 2016

Total time taken to generate the page: 0.22667 seconds