Hi,
In oracle, they use DBMS_SQL.NUMBER_TABLE. I cannot find this type in this link: https://www.enterprisedb.com/docs/en/8.4/oracompat/Postgres_Plus_Advanced_Server_Oracle_Compatibilit...
What's the equivalent for DBMS_SQL.NUMBER_TABLE in EDB postgres 9.6.
Thanks
DBMS_SQL.NUMBER_TABLE is not available in EPAS. However, DBMS_SQL.NUMBER_TABLE in Oracle is
TYPE NUMBER_TABLE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
You can either use above form or an array of number as given below.
edb=# DECLARE
a NUMBER[];
BEGIN
a[1]:=1;
DBMS_OUTPUT.PUT_LINE(a[1]);
END;
1
EDB-SPL Procedure successfully completed
DECLARE
TYPE number_table IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
a NUMBER_TABLE;
BEGIN
a(1):=1;
DBMS_OUTPUT.PUT_LINE(a(1));
END;
1
DBMS_SQL.NUMBER_TABLE is not available in EPAS. However, DBMS_SQL.NUMBER_TABLE in Oracle is
TYPE NUMBER_TABLE IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
You can either use above form or an array of number as given below.
edb=# DECLARE
a NUMBER[];
BEGIN
a[1]:=1;
DBMS_OUTPUT.PUT_LINE(a[1]);
END;
1
EDB-SPL Procedure successfully completed
DECLARE
TYPE number_table IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
a NUMBER_TABLE;
BEGIN
a(1):=1;
DBMS_OUTPUT.PUT_LINE(a(1));
END;
1