How to hang a two two-dimensional table

Hello people,

I had a problem trying to pass two dimension table as a parameter:

Spec:
 
create or replace package test_22012013 as
  type t_record_one is record(
    test1 number(20)
   ,test2 number(20)
   ,test3 number(20)
   ,test4 number(20)
   ,test5 number(20));

  type t_array_one is table of t_record_one
    index by varchar2(3);

  type t_array_two is table of t_array_one
    index by varchar2(8);
    
  ------------------------------------------------------------------------------
  --Function One
  function f_function_one(i_input_one in test_22012013.t_array_two)
    return number;
    
  ------------------------------------------------------------------------------
  --Function Two
  function f_function_two(i_input_two in test_22012013.t_array_two)
    return number;
end test_22012013;
/
Pack:
create or replace package body test_22012013 as
  ------------------------------------------------------------------------------
  --Function One
  function f_function_one(i_input_one in test_22012013.t_array_two)
    return number as
  begin
    return 1;
  end f_function_one;

  ------------------------------------------------------------------------------
  --Function Two
  function f_function_two(i_input_two in test_22012013.t_array_two)
    return number as
    l_num number(20);   
  begin
    select f_function_one(i_input_one => i_input_two)
      into l_num
      from dual;
  end f_function_two;
end test_22012013;
/
I got error PLS-00382: expression is of the wrong type, PLS-00306: wrong number of types of arguments and PL/SQL: ORA-00904

Best regards
Igor

Igor S. wrote:
Hello people,

I had a problem trying to pass two dimension table as a parameter:

Spec:


create or replace package test_22012013 as
type t_record_one is record(
test1 number(20)
,test2 number(20)
,test3 number(20)
,test4 number(20)
,test5 number(20));

type t_array_one is table of t_record_one
index by varchar2(3);

type t_array_two is table of t_array_one
index by varchar2(8);

------------------------------------------------------------------------------
--Function One
function f_function_one(i_input_one in test_22012013.t_array_two)
return number;

------------------------------------------------------------------------------
--Function Two
function f_function_two(i_input_two in test_22012013.t_array_two)
return number;
end test_22012013;
/

Pack:

create or replace package body test_22012013 as
------------------------------------------------------------------------------
--Function One
function f_function_one(i_input_one in test_22012013.t_array_two)
return number as
begin
return 1;
end f_function_one;

------------------------------------------------------------------------------
--Function Two
function f_function_two(i_input_two in test_22012013.t_array_two)
return number as
l_num number(20);
begin
select f_function_one(i_input_one => i_input_two)
into l_num
from dual;
end f_function_two;
end test_22012013;
/

I got error PLS-00382: expression is of the wrong type, PLS-00306: wrong number of types of arguments and PL/SQL: ORA-00904

Best regards
Igor

Try

create or replace package body test_22012013 as
  ------------------------------------------------------------------------------
  --Function One
  function f_function_one(i_input_one in test_22012013.t_array_two)
    return number as
  begin
    return 1;
  end f_function_one;

  ------------------------------------------------------------------------------
  --Function Two
  function f_function_two(i_input_two in test_22012013.t_array_two)
    return number as
    l_num number(20);
  begin
/*    select f_function_one(i_input_two)
      into l_num
      from dual;*/
      l_num:= f_function_one(i_input_two);
      return l_num;
  end f_function_two;
end test_22012013;

Tags: Database

Similar Questions

  • How to get into two different tables in two columns of a listbox of multi column

    Hi all

    I have two different tables of the values assume that table 1A (1,2,3,4,5) and another table B (3,4,5,6,7). I want to write these tables in a multicolumn listbox such as 1st column would be A array and 2nd column table B.

    Thnx in advance

    Saki,

    I hope this helps to further

  • How can I insert a n-dimensional table using Insert table subset?

    I am able to insert a row or a column in the table. But how do I insert a table 2D or 3D in an existing table?

    Kind regards

    Adel SR

    Just it wire in.  Here is a 2D chart inserted into a 3D (at the beginning of the 3D table)...

    BS

  • Extend the two-dimensional array

    Hi all

    How can I extend both the axis of a two-dimensional array?
    DECLARE
      TYPE num_array IS TABLE OF VARCHAR2(100);
      TYPE bidim_num_array IS TABLE OF num_array;
      l_array bidim_num_array;
    BEGIN
      ...
    END;
    in order to fill the two-dimensional table as a matrix:
    l_array(1)(1) := ...
    l_array(1)(2) := ...
    l_array(1)(3) := ...
    l_array(2)(1) := ...
    l_array(2)(2) := ...
    l_array(2)(3) := ...
    l_array(3)(1) := ...
    l_array(3)(2) := ...
    l_array(3)(3) := ...
    I don't know the size of the MxN matrix.

    Thanks in advance.

    Manuel Vidigal wrote:

    How can I extend both the axis of a two-dimensional array?

    Just as you would with one-dimensional, just twice - one for each dimension. You will also need to initialize second dimension table whenever you extend first dimension:

    SQL> DECLARE
      2    TYPE num_array IS TABLE OF VARCHAR2(100);
      3    TYPE bidim_num_array IS TABLE OF num_array;
      4    l_array bidim_num_array := bidim_num_array(); -- initialize two-dimensional array (this initializes first dimension only)
      5  BEGIN
      6    l_array.extend; -- extend two-dimensional array
      7    l_array(1) := num_array(); -- initialize second dimention array
      8    l_array(1).extend; -- extend second dimension array (this extends first dimension only)
      9    l_array(1)(1) := 'Row 1, Column1';
     10    l_array(1).extend; -- extend second dimension array
     11    l_array(1)(2) := 'Row 1, Column2';
     12    l_array.extend; -- extend two-dimensional array (this extends first dimension only)
     13    l_array(2) := num_array(); -- initialize second dimention array
     14    l_array(2).extend; -- extend second dimension array
     15    l_array(2)(1) := 'Row 2, Column1';
     16    l_array(2).extend; -- extend second dimension array
     17    l_array(2)(2) := 'Row 2, Column2';
     18    for i in 1..l_array.count loop
     19      for j in 1..l_array(i).count loop
     20        dbms_output.put_line(l_array(i)(j));
     21      end loop;
     22    end loop;
     23  END;
     24  /
    Row 1, Column1
    Row 1, Column2
    Row 2, Column1
    Row 2, Column2
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    SY.

  • How to extract a single dimension of two two-dimensional array

    Hello

    Perhaps this question is too naïve and simple. I have two two-dimensional chart (256 rows and two columns). All I want is to retrieve one of these columns as a dimensional table a separate. It seems to be something very very basic that should cover just about any programming language. However, I couldn't find the right function in the list of functions of table. I don't know I'm missing something very obvious. I tried the Board index, subset of table, table of cluster and reshape the table. None of them is the right function for this. I have used LabVIEW for awhile now, but I can't find a solution to this fundamental problem. Can someone help out me.

    Thank you

    HI -.

    With the function Index Array you tried a number of cabling to the marked entry index (col)?

    See the vi attached for an example.

  • How to export diferent two tables of contents to epub?

    I have been reseraching french forum of responses to the question I have but could ' t find anything for my case. I am a book of plants convert epub. The layout that gave me was the printed version of the book, I use Indesign 5.5 to convert the epub book. For the results of the tests, I use Calibre and a Kindle.

    I was n style texts and images and everything is great except for the table of contents. The author needs to a content page with all the main chapters (h1 title) and an index at the end of the book with all the names of the plants: this has two titles an eglish followed by the Latin version (h2-h3-Latin and English).

    I've created two different styles of toc, one with only the chapter headings, would be at the table of contents at the beginning and the second style is for the index of plants: with the h2 and h3 titles (I checked the alphabetical button in both to have the section index correctly).

    I have two questions: the first is when I try to place each table of contents at the beginning and at the end of the book. On the page, it looks fine, but when I export to epub, I can choose only in the export Panel, one table of contents. The resulting epub has the same table at the beginning and at the end I tried several times to change the position of the tables, export settings, but I never managed to have two different tables on the same epub.

    The second question is when I had expoorted one of these tests using the style 2 for the index, I get an epub with the two tables of the same material, the index is in alphabetical order, but instead of ordering all the plants of a to z he ordered their "pairs" as they appear on the texts (first English title plants the latin equivalent of a second). How can I do to make this index order alphabetically all the h2 and h3? I need all the a, b, c,... indendently of their position in the page.

    Hope the above makes sense.

    Thanks in advance.

    Thanks for your offer of Ariel, I'm sure is a good script, but I can't affford it right now.

    See you soon

  • Insertion of records in two different tables at the same time?

    Hello everyone, I have question about inserting records in two different tables at the same time, I'm looking for is by the way a unique id, which is created in the first statement insert to the second insert statement. Example of this problem:

    < cfquery name = "addRecords1" datasource = 'test' >

    Insert Into Table1 (name, Date, age)

    Values (< cfqueryparam cfsqltype = "cf_sql_char" value = "#arguments.) "Name # ' >.

    < cfqueryparam cfsqltype = 'cf_sql_date' value = '#arguments. "Date # ' >.

    < cfqueryparam cfsqltype = "cf_sql_int" value = "#arguments. Age #"(>); "

    Select SCOPE_IDENTITY() as RecID;

    < / cfquery >

    < cfquery name = "addRecords2" datasource = 'test' >

    Insert into Table2(Company,City,Date,ID)

    Values (< cfqueryparam cfsqltype = "cf_sql_char" value = "#arguments.Company #" >,)

    < cfqueryparam cfsqltype = "cf_sql_char" value = "" #City # ">,"

    < cfqueryparam cfsqltype = 'cf_sql_date' value = "" #Date # ">,"

    ( < cfqueryparam cfsqltype = "cf_sql_int" value = "How to pass RecID to insert in this table?" >).

    < / cfquery >

    In this example, I'm inserting records in table 1 and creation of IDENTITY SCOPE as RecId. I would like to pass this id and insert it in my table 2. This Id, I'll use in my second table as an identifier. If anyone knows anything about this please let me know. Thank you.

    );
    

    QueryName - DOT - ColumnName, so it should be:

    );
    

    HTH,

    ^_^

  • two-dimensional array

    Hello

    Sorry for this question but I am new to flex.

    How do I declare a two-dimensional array?

    You can do this:

    
    
      
        
      
      
        
        
        
      
    
    

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

  • Impossible to use two af:tables with different colors (skins)?

    Im trying to configure the Siebel self-service application and customize the counting. I have a few problems, because I need to show two af:tables on the same page, but with different colors. One with black background and white text (header and body) and the other with white background and black text. I tried to use styleClass: are, but the css settings defined for the table of the af are the substitution of those mentioned in the style sheets.

    Anyone with an idea how to solve this problem?

    Thank you
    / Jon-Erik

    Hello

    If the styleClass name is table1 then the skin selector would be something like

    .Table1 af | table

    mul afTable.af: table

    I don't see how this can be overloaded. If you hypothesis is that the style class reference must be to a definition of CSS on the page, then indeed, it does not. The styleClass name is an identifier of type named for the skin component and is used to describe more the component skin

    Frank

  • How can I multiply two matrices together in number?

    How can I multiply two matrices together in number?

    Well, there is a function in numbers call sumproduct() that can help you.  Post a screenshot of what you will help us to better help you.

    real matrix operations are not supported in number.

  • How to do a two-page spread in photo books?

    How to do a two-page spread in photo books?

    Hi Myrte Veach,

    If you want to add pages to your photo book project, please follow the steps below.

    Add, remove and rearrange the pages of book

    You can add, remove, or reorder pages from the book. You can insert new pages anywhere in a book, except between the cover on the outside and the inside cover page.

    Note: A book must have an even number of pages. If the change in the number of pages creates an odd number of pages, Photos automatically adds or removes a blank page to keep the number of pages to an even number.

    Click project on the toolbar, and then double-click the book.

    Do one of the following:

    Add a page: select the page you want the new page to follow, and then click Add a Page in the toolbar and choose Add a Page.

    Set the number of pages in a book: click on the book settings button in the toolbar and drag the number of Pages.

    Remove a page from a book: click on the page to select and press DELETE, or click on the button Add a Page in the toolbar, select the Page to delete, then click on continue. You can also click on the page, select the Page to delete, then click on continue.

    Move a page in a book: rest the pointer over a page number until the page button, and then drag the button on the page to move the page to a new location. You can also select a page, and then drag the button to the page.

    Create a photo book

    The link above will give you a lot of information on the creation of your Photo book. Please use the Apple Support communities to post your question. Good day.

  • How to stop opening two windows when I clicon an e-mail, home page link and the link both open. I want to just link to open

    How to stop opening two windows when I click on an e-mail link, the home page and the link that the two open. I want to just link to open

    I deleted cookies and tried to stop this site to open, but it opens, however, how to stop it! I have young children in the House and we don't need that sort of thing...

  • How can I install two OS (Vista + XP Pro) in Satellite A100-785

    Today, I bought a new laptop TOSIHBA SATELLITE A100

    On the other hand when I, but two operation system in my laptop the laptop starts without operating system bootable chooseing, but when I go into the bios to check the sheet music, I can see the vista and the type of folder (NTFS)

    How can I put two OS (vista + xp pro) by chooseing OS WHEN the computer PORTABLE STARTING in Sataellite A100 - 785?

    Hello

    I found a thread where your problem was already discussed, you can easily adapt the instructions on your machine. Just check it

    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=24901&MessageID=91326

    and give some feedback if you have achieved some success.

    See you soon

  • How can I use two counters simultaneously to pulse width measurment

    Hello, everyone!

    I'm new to Labview. I currently have some cDAQ9171 and width measurment with 9401 impulses. My understanding is that the 9401 was 4 meters, which means that I can use these meter separately. However I have the following problem.

    1. I use ctr 0 and ctr 1 (PFI 1 and PFI5) to measure two different impulses. However, it seems that there is an interference between two counters. How can I make two counters working simultaneously and separately?

    2. I first try a pulse width measurment counter in Labview signalExpress. My pulse width is about 0.4ms. However, I can't get the right result, if I choose the starting edge is on the rise (the results always around 20ns. Only if I revise my pulse and pick the starting edge is down, I can get reliable results.

    I'm confused about these issues for about 3 weeks... Is there someone can help what can I do with that?

    I have attached a simple vi...

    Thank you very much!


  • How to tie the two serial numbers using test including the tie in the database.

    I have two separate committees, I need to link the serial number too.  One is being tested as a separate unit, then the two are tested together, I need to make sure that I connect them in the database.  Don't know how to do it, looking for any input I can get.  Using a labVIEW vi to request the entry of a Board, and then use information interface to USE testbed for UUT of the hand.

    I have juries, one of the boards, A onboard, was tested by a different sequence file, then A is connected to Board B, and then they are tested as a complete set.  Received a few suggestions on how to save the two serial numbers, but went with a popup message added types of step (modified record results), and then just have the user scann the second number in and it stands as one of the results of the step in the database.

Maybe you are looking for