Table containing another table (hierarchical table)
Questions tagged [nested-table]
236 questions
2
votes
1 answer
Oracle Apex - Save list of numbers in a varray-table-field
I have a table with varray of number field type aptitude_list as varray(60) of number and want to save/update a comma separated list from an apex-text-field in it.
My SQL statement looks like :
INSERT INTO tbl_aptitude (ID, APTITUDE)
VALUES…

Weltraumfahrer
- 45
- 4
2
votes
1 answer
How to flatten nested tables into a new row?
I have a table where one of the columns contains a nested table of single row.
mytable
title | col
a | {1, 2}
b | {3}
c | NULL
What I need to do is flatten the nested table into a comma-separated String.
Result:
{
a: "1, 2"
b:…

billoot
- 77
- 15
2
votes
3 answers
Send a nested table using sys_refcursor in Oracle10gv2
I need to send some data to Jasper Reports using a sys_refcursor. This data is the result of a query and an evaluation of the query results in pl/sql. The idea is to count some values filtering by several columns in the same table, and that can't be…

Rafa J
- 61
- 9
2
votes
1 answer
Insert into nested table plsql
I'm a newbie with pl sql and I'm facing some problems with inserting into nested tables (I'm using these just to test a procedure).
So my code is:
insert into t_prenotazioni
(nro_cliente, data_disponibilita)
values
…

leobia
- 58
- 8
2
votes
2 answers
How to retrieve distinct values from nested table in Oracle
I have a problem where in I need to retrieve distinct values out of a nested table collection.
Example code:
FUNCTION get_part_atts
( p_gp_id IN dummy_di_parts.di_gp_id%TYPE
, p_attribute_name IN…

Tina
- 53
- 1
- 9
2
votes
1 answer
How to use self defined types with nested tables in PL/SQL member functions?
I am defining a MEMBER FUNCTION for this type:
CREATE OR REPLACE TYPE HITO_T (
nombre VARCHAR2 (20) ,
categoria VARCHAR2 (20) ,
estado VARCHAR2 (10) ,
costo_entrada NUMBER (10,0),
zonas …

Sofia Bravo
- 579
- 8
- 22
2
votes
1 answer
Control constraints of a nested table of references in oracle
I'm doing some Object-Relational stuff in oracle. I'm having problems with a nested table of references, in which I cannot control the PK as usual, so I have to create a trigger to control it.
The types are:
CREATE OR REPLACE TYPE Tipo_Persona AS…

omniyo
- 330
- 2
- 6
- 19
1
vote
1 answer
How to determine the cell size of a nested table cell in VBA for Microsoft Word?
It seems that VBA retrieves a false value for the cell height of a nested table cell.
The primary table
After selecting a form field, I try to get position and size (x1,y1,x2,y2) with the following code:
ActiveDocument.Fields(xx).Select '…

andrejtm
- 13
- 2
1
vote
1 answer
Properly expand xml table nested within cell (Power Query)
I would appreciate your help on importing and expanding an XML file, with Power Query.
The XML link is here:
UN Consolidated Sanctions List
After expanding the table named ”Individual” I get a lot of tables nested within cells.
Nested Table
I tried…

Bee Hoof
- 13
- 3
1
vote
1 answer
Oracle 11 - nonempty nested table reported empty when queried for size
Another addition to collection of weird Oracle 11g SQL queries. Assuming there is a empty table and user-defined type
create table tz_exp (p_id number(38,0) not null);
create or replace type rms.joedcn_number as table of number;
then following…

Tomáš Záluský
- 10,735
- 2
- 36
- 64
1
vote
2 answers
How to get distinct items and number of occurrences on a nested table?
I have a nested table that includes a list of emails, which could be inside several times.
The problem is I need to get the distinct list of items, and the number of times it appears on the list.
| emails |
| ------------ |
| a@mail.com |
|…

Jafex
- 11
- 2
1
vote
1 answer
Weird ORA-00904 invalid identifier in query with nested CTEs and collections
Following query fails on ORA-00904. Why?
with t (id, parent_id) as (
select 1, 2 from dual
)
, wrapper (id, parent_id) as (
select * from t where parent_id = 2
)
, wrapper_with_elements (id, elements) as (
select u.id, sys.odcinumberlist(1) as…

Tomáš Záluský
- 10,735
- 2
- 36
- 64
1
vote
0 answers
Nested Table on Click of the arrow
I have a table which has arrow on each row. When the arrow is clicked, the row is expected to expand and show more data in a tabular form. When the arrow is clicked again, the expanded nested table should collapse. The code is in typescript.
This is…

Tanu
- 1,286
- 4
- 16
- 35
1
vote
1 answer
Create nested table from header and details table
I would like to create a nested table with order data.
I have orders and order_details tables. The key is order_id. When I explicit write the field names it works fine but my tables have like 20 fields each. Is there a way to select all fields?
This…

i_am_cris
- 557
- 1
- 5
- 19
1
vote
0 answers
Does any SQL standard include a REF CURSOR or TABLE type definition?
I always find it hard to read the rather abstract SQL standard specification, for instance this document here:
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
I'm wondering, is any of the major RDBMS's supported concepts of REF CURSOR's…

Lukas Eder
- 211,314
- 129
- 689
- 1,509