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
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


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: 65149
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.

Previous Topic: how to check whenever package got modified
Next Topic: 2d position array/varray in plsql
Goto Forum:

Current Time: Mon Aug 21 14:42:09 CDT 2017

Total time taken to generate the page: 0.01607 seconds