Home » SQL & PL/SQL » SQL & PL/SQL » Merge TWO or more Result Rows in ONE (win xp, oracle 10g)
Merge TWO or more Result Rows in ONE [message #358450] Tue, 11 November 2008 07:16 Go to next message
jash_hirani
Messages: 21
Registered: August 2008
Location: India
Junior Member
Hello,

I was wondering is this can be done,

Merge TWO or more Result Rows in ONE based on a fixed value which would be present in COLUMN1 that follows

Current ResultSet

COLUMN1 | COLUMN2 | COLUMN3
A | B1 | C1
A | B2 | C2

Required ResultSet

COLUMN1 | B1 | B2
A | C1 | C2

B1 and B2 are already know values, (so can be hardcoded)
And two rows need to be merged in 1

Thanks in advance
Re: Merge TWO or more Result Rows in ONE [message #358456 is a reply to message #358450] Tue, 11 November 2008 07:28 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Search for pivot, rows to columns in this forum. You will find tons of examples how to do it.

Regards

Raj
Re: Merge TWO or more Result Rows in ONE [message #358466 is a reply to message #358456] Tue, 11 November 2008 08:41 Go to previous message
jash_hirani
Messages: 21
Registered: August 2008
Location: India
Junior Member
Thanks Raja,,, your suggestion solved my problem along with Asktom

Cheers!!!
Previous Topic: REGEXP_LIKE function
Next Topic: show % of tablespace correctly
Goto Forum:
  


Current Time: Thu Dec 08 18:27:02 CST 2016

Total time taken to generate the page: 0.24261 seconds