String aggregation
793686Sep 9 2010 — edited Sep 9 2010hi
I want to aggregate string values from my table. Following are the details
create table emp (idd integer , name varchar(20), position float, qty float);
insert into emp values(1,'abc',500,600);
insert into emp values(1,'def',500,700);
insert into emp values(1,'ghi',500,800);
insert into emp values(2,'sss',200,900);
insert into emp values(3,'aaa',400,1100);
I want to make a query that can give the ouput below
idd name_group sum(position) sum(qty)
1 abc,def,ghi 1500 2100
2 sss 200 900
3 aaa 400 1100
I am using oracle 9
Please help
Thanks