Home » SQL & PL/SQL » SQL & PL/SQL » concatnating the second table data in single column of first table (oracle 10G apex 3.0)
concatnating the second table data in single column of first table [message #344768] Mon, 01 September 2008 04:02 Go to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
I have two tables
first table name : table1

table1_id	number
table2_desc	varchar2(4000)


second table name : table2
table2_id	number referencing table1(table1_id)
table2_vouno	number(12)


The following datas are available

In table1

table1_id	table2_desc
1001		null
1002		null

In table2

table2_id	table2_rowno
1001		12100
1001		12200	
1002		11000
1001		12350
1002		11500
1002		13000
1002		14000



I want to update table1 without using procedure through select statement and want to achieve the following result.is it possible

after update table1 should have the following data

table1_id	table2_desc
1001		12100,12200,12350
1002		11000,11500,13000,14000


please suggest the way to do it.

yours
dr.s.raghunathan


Re: concatnating the second table data in single column of first table [message #344816 is a reply to message #344768] Mon, 01 September 2008 05:45 Go to previous message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
With almost 200 post you should know that you have to post a test case: create table and insert statements along with the result you want with these data.
Also post what you tried.

Forget to mention this is a pivot/unpivot problem which has been asked many times and you should also know how to search now.

Regards
Michel

[Updated on: Mon, 01 September 2008 05:46]

Report message to a moderator

Previous Topic: Data retrieving
Next Topic: when partitioning the table should the partitioning must also happen to indexes assiociated with tab
Goto Forum:
  


Current Time: Tue Dec 06 04:19:37 CST 2016

Total time taken to generate the page: 0.09187 seconds