Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:47:28+00:00 2026-06-12T08:47:28+00:00

I have an stored procedure that looks like this: TYPE ref_cursor IS REF CURSOR;

  • 0

I have an stored procedure that looks like this:

TYPE ref_cursor IS REF CURSOR;    
TYPE parametro IS RECORD (
    nombre      VARCHAR2(50), -- I want to remove this value and make it the key of the table instead.
    valor       VARCHAR2(32000),
    tipo        VARCHAR2(1),
    sentencia   VARCHAR2(32000)
);
TYPE parametros IS TABLE OF parametro INDEX BY VARCHAR2(50);

PROCEDURE build_cursor (
    params IN parametros
    results OUT ref_cursor
);

And from the build_cursor procedure, I want to be able to access to the contents of the table by its key.

parametros('key');

However, I don’t know how to build an associative array from Java, I have seen only examples of simple arrays, i.e: TYPE parametros IS TABLE OF parametro;

How can I call the build_cursor procedure from java?

I read this: How to call oracle stored procedure which include user-defined type in java? but I don’t know what changes do I have to make to his java example for creating the associative array; Where do I put the Key of the current element?

This is a working test from Oracle.

params('key').nombre        := 'key'; -- I want this to be removed because it's the key.
params('key').valor         := 'Roger';
params('key').tipo          := 'V';
params('key').sentencia     := 'Something';
-- Call the procedure
pk_sql_utils.build_cursor(
    params => params,
    results => :results
);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:47:30+00:00Added an answer on June 12, 2026 at 8:47 am

    Only SQL objects can be referenced by jdbc, not PL/SQL objects. Associative arrays are PL/SQL objects, so you won’t be able to “see” them from jdbc.

    You could use a wrapper PL/SQL function with SQL objects (an associative array is analogous to one nested table of indexes and one nested table of values).

    You could also use a temporary table: jdbc batch inserts into the temp table, a wrapper procedure (or PL/SQL block) reads the temp table and calls your procedure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a line in my SQL Stored Procedure that looks like this (works
Let's say I have a simple stored procedure that looks like this (note: this
I have a stored procedure that looks like: CREATE PROCEDURE dbo.usp_TestFilter @AdditionalFilter BIT =
I have a Stored Procedure that look like this BEGIN insert into `TheSomaProject`.`Projects` (
I've got a mySql stored procedure that looks like this-- delimiter | create procedure
I have an outdated stored procedure that looks something like: CASE WHEN (org.org_misc_data =
I have this stored procedure that I want to use for my SAP crystal
I have a stored procedure that has this line: SET @SQL = 'SELECT path,title,tags
I have a stored procedure that logs some data, how can I call this
Suppose I have a MySQL table called MyTable, that looks like this: +----+------+-------+ |

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.