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
1
vote
1 answer

Pass varray variables into stored procedure - basic

Hello I am a php developer, trying to get going with Oracle. So I need to pass a collection of variables into an Oracle stored procedure. So as a basic try, I am trying to access a procedure which would accept three parameters, out of which two…
macha
  • 7,337
  • 19
  • 62
  • 84
1
vote
1 answer

select query call a function which return varray in Oracle

I want to create a function which return VArray and populate the values in select query. My VArray is: create type array_squad_t is varray(2) of VARCHAR2(200); My function is CREATE OR REPLACE FUNCTION test_varray( id number ) RETURN…
1
vote
1 answer

How to import data into a varray using sqlldr

I am trying to import data into Oracle database using sqlldr. I am using this documentation, but not successfully: sqlldr and sqlldr2 Decribing what I am doing: create the varray type and the table: CREATE OR REPLACE TYPE fv_integer_varray_12 AS…
Siqueira
  • 423
  • 1
  • 7
  • 29
1
vote
1 answer

How to Select value in Oracle Varray

Working in Oracle 11.2 I have created a type for phone numbers to be associated with an employee.... I'm trying to learn syntax and DO NOT want to be criticized on good or bad database deign... here is my *.sql file CREATE TYPE AddressType AS…
fifamaniac04
  • 2,343
  • 12
  • 49
  • 72
1
vote
2 answers

How to access varray element in SQL in the table column

I am trying to find an easy way to access varray element in the table column in a SQL query. Column id of varray type, but needs to be presented to a database client with each element as a column. Something like column_name(1).x,…
Vladimir
  • 21
  • 5
1
vote
1 answer

Adding elements in a Varray

I'm working on Oracle. If I have table in which one of the attributes is a Varray, like : create type list_surname as Varray(20) of varchar2(15) / create table employes(name varchar2(15), ls_pnm list_surname, …
1
vote
1 answer

Record field doesn't have default value

I have the following code: DECLARE TYPE rt_someDetails IS RECORD( deny_discount VARCHAR2(4) DEFAULT 'NO'); TYPE someDetails_va IS VARRAY(2) OF rt_someDetails; l_someDetails_va someDetails_va; l_rt_someDetails…
Robotronx
  • 1,728
  • 2
  • 21
  • 43
1
vote
3 answers

Why varray is called as variable sized array in oracle when it is bounded in nature?

I was learning collections in oracle and came across Varrays. It says that Varrays are of fixed sized with consecutive subscripts then why we say it as Variable sized array?
1
vote
1 answer

varrays oracle ORA-02330

I'm develop a simple app for learn about oracle and database object-relational with objects and varrays... I did the next code: this is my varrays SQL> create or replace type software_va as varray(3) of varchar2(30); 2 / here is an object that I…
BlackSan
  • 58
  • 1
  • 10
0
votes
1 answer

PLSQL user defined table types and joins

Let's say I have a user defined table type: create or replace type SrcCodeTbl is table of varchar(20); I have a procedure that has a parameter of this type: create or replace procedure Blah.MyProc( srcCodesIN in SrcCodeTbl ) Can I use srcCodesIn…
MonkeyWrench
  • 1,809
  • 2
  • 24
  • 48
0
votes
2 answers

How to insert the comma separated value in table

I have a table like that: columnId1 => "word1,word2,word3" columnId3 => "word4,word5,word6" I want to create a table like that: columnId1 word1 columnId1 word2 columnId1 word3 columnId2 word4 columnId2 word5 columnId2 word6 How can I do it…
user951487
  • 845
  • 7
  • 19
  • 30
0
votes
1 answer

Declaring a varray of custom records and using Extend method(which gives a syntax error??)

So, I am working on a View that calls a function. Before I declare the function or View, I am defining a custom composite record. Then, I declare a vararray of type:my custom composite record. Within the function, I then define a new variable of…
JPho
  • 19
  • 4
0
votes
0 answers

Error if coordinates in SDO_ORDINATE_ARRAY has decimals

I´m trying to insert a geometry into a table using the Oracle SDO_GEOMETRY objects. If I use the following coordinates without decimals, it works without issue: DECLARE ordinate_arr SDO_ORDINATE_ARRAY := SDO_ORDINATE_ARRAY(2,4, 4,3, 9,3, 13,5,…
0
votes
0 answers

Problem with calling a Package with Procedure and Varray Inside

I'm starting new into SQL and we got an exercise related to Packages and Varrays. To be more specific, I have to create a python script which connects to my BD and inserts a varray of 100 numbers in a table. I've create the package this way: create…
Gabri
  • 1
0
votes
0 answers

Pass UDT array from C# to Oracle SP

I am trying to pass UDT array to an Oracle SP from .NET but I am getting this strange error. PFB my code: Oracle Code: create or replace type Patient_Vascular_Access AS OBJECT ( access_type_code number, access_location_code number, …