Home » Developer & Programmer » Reports & Discoverer » multiples rows into one row. (Oracle 10XE , form 6i)
multiples rows into one row. [message #675368] |
Sun, 24 March 2019 10:48 |
shahzad-ul-hasan
Messages: 615 Registered: August 2002
|
Senior Member |
|
|
create table student (stuid number(6) primary key,name varchar2(30),mob varchar2(20));
insert into student (1,'abc','92333444444');
insert into student (2,'aac','92333004444');
insert into student (3,'avc','92333004444');
insert into student (4,'afc','92333233444');
insert into student (5,'atc','92333233444');
insert into student (6,'arc','92333444444');
insert into student (7,'aec','92333444444');
insert into student (8,'atc','92333123444');
insert into student (9,'arc','92332334444');
insert into student (10,'aec','92333444444');
i want to get the result as:
mob Stuid
---------------------------------------------------
92333444444 (1,6,7,10)
92333004444 (2,3)
92332334444 (4,5,9)
Quote:
SQL> CREATE TYPE number_7_2_ntt AS TABLE OF NUMBER(7,2);
2 /
Type created.
SQL> SELECT mob
2 , CAST(COLLECT(stuid) AS number_7_2_ntt) AS sals
3 FROM student
4 GROUP BY
5 mob;
mob SALS
---------- -------------------------------------------------------------------------
92333444444 Number_ntt(1,6,7,10)
92333004444 Number_ntt(2,3)
92332334444 Number_ntt(4,5,9)
how i can use this query in reports.it return error:
00-600: internal error code : argument [17069]/
please advised.
|
|
|
Goto Forum:
Current Time: Sat Apr 20 10:09:12 CDT 2024
|