Questions tagged [varray]

VARRAY (variable-size arrays) is a PL/SQL datatype

Varrays (short for variable-size arrays) hold a fixed number of elements (although you can change the number of elements at runtime). They use sequential numbers as subscripts. You can define equivalent SQL types, allowing varrays to be stored in database tables. They can be stored and retrieved through SQL, but with less flexibility than nested tables.

Reference:

119 questions
0
votes
3 answers

display a record which contains a VARRAY column

I have a function which returns a RECORD. One of the record's columns is VARRAY. Can someone hint me how to display the RECORD, please? (my problem is related to the VARRAY column. create or replace TYPE phone_list_typ AS VARRAY(5) OF…
mikcutu
  • 1,013
  • 2
  • 17
  • 34
0
votes
1 answer

How does Oracle VARRAY represent data in Java terms?

Slightly broad question here, but here goes I'm trying to call an Oracle stored procedure, which returns a VARRAY which is of constructed from a ROWTYPE on one of my tables. For simplicity, lets say this table looks like the following : MY_TABLE ID…
Jimmy
  • 16,123
  • 39
  • 133
  • 213
0
votes
1 answer

how to use varray to recieve multiple arguments in oracle function

I want to create a function which will take multiple arguments in varray and return the greatest value of that varray, like greatest() function do in oracle. Arguments may contain all number or text. I'm thinking about using a varray of number or…
Amir Hossain
  • 173
  • 2
  • 14
0
votes
2 answers

using objects in plsql varray

I'm trying to create an object in pl/sql using sql developer. I'm just messing around with the basics to get a hang of it. I keep getting a error Invalid reference to variable 'I' SET serveroutput ON create or replace type conditions as…
manic bubble
  • 147
  • 1
  • 3
  • 13
0
votes
0 answers

JDBC: get VARRAY type defined in an oracle package

I'm trying to execute an oracle procedure that has an array type(VARRAY) output parameter. This array type is defined in a package. VARRAY definition: create or replace package PKG_TYPES_VARIABLES as TYPE RETURNARRAY IS VARRAY(100) OF…
0
votes
1 answer

Using an varray type in a select statement

I am trying to use an varray-type in a select statement: CREATE OR REPLACE PROCEDURE ARRAYTEST IS type array_t is varray(2) of int; array_test array_t := array_t(10,11); BEGIN select * from STATISTIK where abschluss1 in array_test; END; But…
noircc
  • 650
  • 10
  • 28
0
votes
1 answer

Oracle Stored Procedure varray beyond count

i've created 3 stored procedures. Each of their functions are : 1. proc_insertleveluser -> insert into "leveluser" table and return the last id inserted 2. proc_insertpermissiondtl -> insert into "permission_dtl" table and return the last id…
thekucays
  • 568
  • 3
  • 9
  • 32
0
votes
0 answers

Oracle collections/PL/SQL programming

I am a beginner in the ORACLE PL/SQL Programming arena, and this is the first time i am working with collections. This is my requirement. I have defined two objects with required columns from two tables, now while looping through picking record by…
jiterika
  • 21
  • 1
  • 4
0
votes
0 answers

Jpa2.0 Hibernate how to handle Oracle VARRAY type

I have field VARRAY of FLOAT. And I try to load this field in JAVA with JPA2.0/hiberhate. I found only that TopLink provider support VARRAY, but no information what should I do for Hibernate provider. Normalisation of tables it is not my way...…
Oleg
  • 77
  • 5
0
votes
1 answer

ORA-06532: Subscript outside of limit

Actually I'm trying to update 1000's of records and I'm doing commit for every 5000 records. but i get the above error due to limit that i have on varray . Please provide alternative for array data type for even storing 100k key values as array!…
VRVigneshwara
  • 1,009
  • 8
  • 10
0
votes
1 answer

Accessing Data inside an object that is in a VARRAY Oracle

I am new to PL/SQL and working with hybrid tables so I am sorry if I missed something obvious, I thought I had gotten most of the major stuff down. I recently came across an issue with trying to access data in a VARRAY of type OBJECT. I am trying to…
user3183843
  • 57
  • 1
  • 9
0
votes
1 answer

In Oracle Can i refer a VARRAY in MERGE syntax this way?

The following produces a error: [Error] ORA-00904 (265: 19): PL/SQL: ORA-00904: "INP"."COLUMN_VALUE": invalid identifier MERGE INTO tab_mapping tbl_llclm USING ( SELECT COLUMN_VALUE as map_id FROM TABLE…
user2275460
  • 339
  • 3
  • 14
0
votes
2 answers

JPA - Can't insert into a table with a defined type (Oracle)

I have the following problem: in my database there is a table that uses a defined type: CREATE OR REPLACE TYPE ARRAY_METHODS IS VARRAY (10) OF NUMBER (2); This column is mapped as List in its respective entity. The problem starts when I…
Sergi
  • 579
  • 3
  • 14
0
votes
2 answers

Collecting into VARRAY inside SQL statement

I have the following SQL query : SELECT ID, OC_YEAR FROM ACCOUNTS; This query returns the following resultset: ID | OC_YEAR ------------------------------------ 10 2006 10 2007 …
Mikayil Abdullayev
  • 12,117
  • 26
  • 122
  • 206
0
votes
1 answer

Using varray as a constant in PL SQL

Is it possible to use varray of strings as a constant in PL SQL and how? For example I've created a CRUD matrix builder in PL SQL and it works fine with this kind of code: v_check := INSTR2(v_string_fnc, 'DROP '); string_to_parse :=…
shonster88
  • 84
  • 9