Home » SQL & PL/SQL » SQL & PL/SQL » How to merge more columns into a single row in Oracle? (merged)
How to merge more columns into a single row in Oracle? (merged) [message #439764] Tue, 19 January 2010 06:26 Go to next message
fazal_haq2001
Messages: 35
Registered: July 2006
Location: India
Member
Hi Guys,
I have a doubt in merging of rows into a single row based on a condition
Ex) In Employee Leave table,2 date fields are there
leave_strt & Leave_end
I have 3 rows for eg)
Emp No Leave_strt Leave_end
101 01/01/2010 10/01/2010
101 11/01/2010 15/01/2010
101 16/01/2010 20/01/2010

I want those data in a single row like

Emp No Leave_strt Leave_end
101 01/01/2010 20/01/2010..

Note:
These grouping has to done only if there is no gap in between leave_strt & Leave_End.
Please Assist..Thanx in Advance

Regards,
Fazal ...
Re: How to merge more columns into a single row in Oracle? (merged) [message #439771 is a reply to message #439764] Tue, 19 January 2010 06:37 Go to previous message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no merging instruction, you have to delete the old one and insert the new ones.

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

Regards
Michel

Previous Topic: need to find out column value..
Next Topic: Reg Grants to the Synonym created in one user to another user
Goto Forum:
  


Current Time: Fri Dec 09 08:10:58 CST 2016

Total time taken to generate the page: 0.09651 seconds