1

Topic: Output array field values

There is a variable:
p_check_response dbo_auth_check_account_resp;
This type:

CREATE OR REPLACE TYPE dbo_auth_check_account_resp UNDER dbo_auth_check_response
(
imsi_modified_accounts pair_number_number_array
)

And it:

CREATE OR REPLACE TYPE pair_number_number_array IS TABLE OF pair_number_number

And already here:

CREATE OR REPLACE TYPE pair_number_number AS OBJECT
(
key NUMBER;
value NUMBER
)

please;
How I can deduce fields key NUMBER and value NUMBER in DBMS_OUTPUT.PUT_LINE ()?
How this line will look?
Tried:

DBMS_OUTPUT.PUT_LINE (to_char (p_check_response.imsi_modified_accounts.value));

Produces an error (
I do not know where it is possible to read about it something ((
I ask the help (((

2

Re: Output array field values

igor_alex wrote:

I do not know where it is possible to read about it something ((

RTFM PL/SQL Collections (FAQ) : "You can access each element of a collection variable by its unique index, with this syntax: ..."

3

Re: Output array field values

igor_alex wrote:

I do not know where it is possible to read about it something ((

The master, the friend! Now  also I will write, wait pair of minutes.

4

Re: Output array field values

igor_alex;
What of lines

R2015 wrote:

TABLE OF pair_number_number

you expect to receive in a scalar output in put_line?

5

Re: Output array field values

igor_alex wrote:

there is a variable:
p_check_response dbo_auth_check_account_resp;
This type:

CREATE OR REPLACE TYPE dbo_auth_check_account_resp UNDER dbo_auth_check_response
(
imsi_modified_accounts pair_number_number_array
)

And it:

CREATE OR REPLACE TYPE pair_number_number_array IS TABLE OF pair_number_number

And already here:

CREATE OR REPLACE TYPE pair_number_number AS OBJECT
(
key NUMBER;
value NUMBER
)

please;
How I can deduce fields key NUMBER and value NUMBER in DBMS_OUTPUT.PUT_LINE ()?
How this line will look?
Tried:

DBMS_OUTPUT.PUT_LINE (to_char (p_check_response.imsi_modified_accounts.value));

Produces an error (
I do not know where it is possible to read about it something ((
I ask the help (((

https://docs.oracle.com/cd/B28359_01/ap … m#LNPLS005
At you pair_number_number_array IS TABLE OF pair_number_number
The table (array), for a value output it is necessary to specify what  from an array you want to deduce
(If all that is necessary a cycle)
type such

i:=p_check_response.imsi_modified_accounts.first; - the first  from the table
--FOR i IN p_check_response.imsi_modified_accounts.FIRST. p_check_response.imsi_modified_accounts.LAST - a cycle from the first on last
--LOOP
dbms_output.put_line (p_check_response.imsi_modified_accounts (i).value);
--END LOOP;

.....
stax

6

Re: Output array field values

Stax;
Thanks big

7

Re: Output array field values

igor_alex wrote:

Stax;
Thanks big

did not begin to Read, waited local  from simple in the most elementary.