9
votes
2answers
3k views

Why is this check for null associative array in PL/SQL failing?

I have an associative array created by a type of rowtype of a table column. To give an example, this is how it is(the table names are different, but the structure is the same): This is the DDL of ...
5
votes
3answers
8k views

What's the difference between pls_integer and binary_integer?

I've inherited some code which is going to be the base for some additional work. Looking at the stored procs, I see quite a lot of associative-arrays. Some of these are indexed by binary_integers, ...
1
vote
1answer
745 views

PL/SQL - Iterating over 'table of' to produce ref cursor

I have a number of old SP's which have output arguments of type 'table of', like this ... TYPE tblSAM_DD_TEXT IS TABLE OF VARCHAR2(50) INDEX BY BINARY_INTEGER; TYPE tblSAM_TYPE IS ...
1
vote
2answers
667 views

Transforming single-row result set into an associative array

Say, I have the following query: select 1 foo, 2 bar, 3 baz from dual; Basically, this query always returns me one row. I need to create an associative array from that, one of this kind: ...
3
votes
3answers
11k views

PL/SQL: Selecting from a table into an assoc array

Hey guys, I'm trying to select data into a pl/sql associative array in one query. I know I can do this with a hardcoded key, but I wanted to see if there was some way I could reference another column ...
1
vote
2answers
2k views

What am i doing wrong while trying to use this oracle package/procedure?

I have written this package CREATE OR REPLACE PACKAGE CURVES AS type t_forecast_values is table of test.column2%TYPE index by varchar(20); assoc_array t_forecast_values; procedure sp_insert ...
2
votes
1answer
2k views

Return an Oracle Associative Array from a function

Does anybody know if it is possible to return an associative array as the result of an Oracle function, if so do you have any examples? I have an Oracle package which contains an associative array ...
4
votes
3answers
13k views

PL/SQL bulk collect into associative array with sparse key

I want to execute a SQL query inside PL/SQL and populate the results into an associative array, where one of the columns in the SQL becomes the key in the associative array. For example, say I have a ...
6
votes
2answers
6k views

Using an Oracle Table Type in IN-clause - compile fails

Simply trying to get a cursor back for the ids that I specify. CREATE OR REPLACE PACKAGE some_package AS TYPE t_cursor IS REF CURSOR; TYPE t_id_table IS TABLE OF NVARCHAR(38) INDEX BY ...
2
votes
1answer
12k views

How to use an Oracle Associative Array in a SQL query

ODP.Net exposes the ability to pass Associative Arrays as params into an Oracle stored procedure from C#. Its a nice feature unless you are trying to use the data contained within that associative ...