How to call the nested in the SQL table collection

Please see the example below, how to attach the collection vmi_emp with history_emp table

CREATE or REPLACE type vmi_emp as an object

(empno varchar2 (500),)

Ename varchar2 (500),

HireDate date,

SAL number (20));

CREATE or REPLACE type nested_emp is table of the vmi_emp;

declare

v_type nested_emp;

Start

Select vmi_emp (empno, ename, hiredate, sal)

bulk collect into v_type from emp;

???????????????? Select * from history_emp a, b vmi_emp where a.empno = b.empno

end loop;

end;

Select * from history_emp has, b table (v_type) where a.empno = b.empno

Tags: Database

Similar Questions

  • How to call the procedure type table

    Hi I have the below requirement

    Created in the sub table type

    CREATE or REPLACE the TYPE char_type IS the TABLE OF VARCHAR2 (4000);

    create or replace procedure test_proc_type (p_type char_type) is

    Start

    I'm looping 1.p_type.count

    dbms_output.put_line (p_type (i));

    end loop;

    end;

    How to call the procedure with parameter as a type!

    SQL> create or replace type  char_type as table of varchar2(4000)
      2  /
    
    Type created.
    
    SQL> create or replace procedure test_proc_type (p_type char_type)
      2  is
      3  begin
      4    for i in 1..p_type.count loop
      5      dbms_output.put_line (p_type(i) ) ;
      6    end loop;
      7  end;
      8  /
    
    Procedure created.
    
    SQL> set serveroutput on
    SQL>
    SQL> exec test_proc_type(char_type('A','B','C','D','E'))
    A
    B
    C
    D
    E
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • How to call the stored procedure when I press the button

    Hello

    I want to know how to call the procedure/SQL statement when I press the button using callable statement.

    can someone give me it please link who knows the steps to do this.

    Thanks in advance,
    SAN

    Hello

    read this good example http://www.baigzeeshan.com/2010/05/calling-plsql-procedure-and-function-in.html

    ~ Abhijit

  • How to execute the sql statement in the file beats?

    I want to execute after the statement
    C:\ > sqlplus/nolog
    SQL > conn scott/tiger
    SQL > select * from tab;

    I know I can achieve it following test.bat and testdb.sql file
    test.bat is:
    sqlplus/nolog @testdb.sql

    TestDB.SQL is:
    Conn scott/tiger
    Select * from tab;

    Now I don't want to use the sql file, I want only use bat file, as follows:
    test.bat is:
    sqlplus/nolog
    Conn scott/tiger
    Select * from tab;

    When I run test.bat, I find only one sqlplus /nolog execute statement, do not execute other statements.
    (1) I want to know if there is a method to run the SQL file by fighting without a sql file? How to make it happen?
    (2) if I call the sql file, how to hide the password of user? Because I don't want other people to know scott password, if I use conn scott/tiger in testdb.sql, other person can see testdb.sql and the password. Is there a good way to avoid?

    Thank you!

    It works a bit different in Windows. Create a file is like this:

    (
      echo conn scott/tiger@orcl
      echo spool c:\temp\list.txt
      echo select sysdate from dual;
      echo spool off
      echo exit
    ) | sqlplus -s -l /nolog
    
  • How to call the function (function Build-in user) in Pro * C program

    We have developed the application Pro * C program.
    TimesTen version is "TimesTen release 11.2.1.5.0 (64-bit, Linux/x86_64) (tt112150:53308) 2010-03 - 04 T 20: 39:30Z.

    We would like to develop Pro * C program you are using PL/SQL.

    We have a few questions.
    How to call the function (function Build-in user) in Pro * C program?

    #########
    TEST
    #########

    ttisql:
    Command > create or replace FUNCTION F_SAMPLE (i_str IN VARCHAR2)
    > BACK NUMBER
    > o_number NUMBER;
    > START
    > select i_str
    > in o_number
    > double;
    >
    > O_number RETURN;
    >
    > EXCEPTION
    > Others THEN
    > RETURN 0;
    > END;
    > /.
    display errors
    The function is created.
    Order > show errors
    No errors.
    Command >
    Command > set serveroutput on;
    Command > declare
    > number of num1;
    > start
    > num1: = F_SAMPLE ('A');
    > DBMS_OUTPUT. PUT_LINE ("F_SAMPLE" |) ' ' || NUM1);
    > end;
    > /.
    F_SAMPLE 0

    PL/SQL procedure successfully completed.

    Command >


    Pro * C case:

    EXEC SQL BEGIN DECLARE SECTION;
    number of num1;
    EXEC SQL END DECLARE SECTION;

    EXEC SQL EXECUTE
    Start
    : num1: = F_SAMPLE ('A');
    end;
    END-EXEC;

    Make sure to install:
    Error on line 146, column 3, file plsqlPROC.pc:
    Error on line 146, column 3 in file plsqlPROC.pc
    number of num1;
    .. 1
    PCC-S-02201, encountered the symbol "num1" when expecting one of the following conditions:


    Thank you.

    GooGyum

    There are two problems with your variable declaration:

    1. the name of the variable and type are thew misplacement autour.

    2. you may not use a host variable type.

    If you change this to:

    EXEC SQL BEGIN DECLARE SECTION;
    int num1;
    EXEC SQL END DECLARE SECTION;

    Then it will work very well.

    Chris

  • How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    Hi all

    How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    F2 does NOT an on-screen BIOS setting.

    Is there another trick?  Or, perhaps, defining the procedure step by step to start the BIOS?

    TIA

    Power on the laptop and all logo HP being displayed, press F10.

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

  • How to call the java function with javascript setting in mobile adf?

    How to call the java function with javascript setting in mobile adf?

    The ADF Mobile utility container API can be used from JavaScript or Java.

    Application container API - 11 g Release 2 (11.1.2.4.0)

  • How to import the .sql file in oracle apex?

    I am new to oracle apex...

    How to import the .sql file in oracle apex?

    I have to import a table in apex...

    This script I have to write in the .sql file...

    pls help...

    Published by: 794244 on January 31, 2011 21:31

    Hi Manu

    You can import and browse workshop SQL, SQL Scripts .sql files. If you have multiple SQL statements in your script, make sure that they are separated by the / character

    Andy

  • How to call the variables of the scene inside movieClips

    How to call the variables of the scene inside movieClips

    One way would be to use "MovieClip (root)" to target variables in the main timeline... MovieClip (root) .someVariable = someValue;

  • How to call the javascript function in ADF

    I have the javascript function stored in a .js file external (try to reuse in another application). How can call the javascript function for an event of ADF faces component. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    Published by: sgodavar on Sep 24, 2010 11:44

    Include JavaScript to the jsff/jspx as page:

    Call it like:

    Type = "dblClick" / >
    Amit

  • How to get the SQL if I get exception

    I get this exception and do not know what was the actual sql with the variables of liaison who was executed.



    sqlmesg = error in the select query to retrieve the segment associated with a pair of cables: ORA-01006: there is no bind variable

    y at - it a way to get the real sql executed so I know what mistake I did.

    I thought your question was about how to view the SQL statement and bind variables in the exception. The answer to that is to put variables in the exception message.

    The root cause of the problem seems to be that your dynamic SQL statement may require 3 or4 variable bind but your USING clause specifies always 4 values if the underlying SQL statement has 3 positions, it will lead to an error.

    Justin

  • How to read the color table in a subvi?

    How to read the color table in a subvi? Is it made by a reference to the table or with a global variable? For a better understanding of the problem, I added to vi. Run the "run.vi." I want to see

    the background color of the table "run.vi" in the subvi called "read color.vi".

    How can I do?

    Thanks in advance

    Norick

    pop up on the wire table refernece and establishes 'control '. Add this control to the icon of the sub - VI decision-making and then wire ref of the appellant to this Terminal VI so the calling VI move the ref to the Subvi.

    Ben

  • How to configure the partition table for SSD?

    Drive: 32 GB SSD

    I accidentally delete without backup partition table information and would like to know how to put the partition table, I can access the tools of partition table, but do not know how to define.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    Hello

    Thanks for posting your query in Microsoft Community.

    The SSD could be seen in the disk management window, and you could name and set up as another hard drive internal. To create a partition or volume on a hard disk, you must be logged in as an administrator, and there must be unallocated disk space or free space in an extended hard disk partition. To repartition your hard drive, please consult the following link and check if it helps.

    I can I repartition my hard disk?

    Additional information:

    Create a new Partition on a hard disk in Windows 7

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • How to create the logical tables & how to give joints according to obiee 11g?

    Hello

    I have again to obiee 11g. I want to create the logical tables in MDB layer.

    After that I want to give joins according to MDB.

    I don't know, how to create the logical tables and how to give joints according to obiee 11g?

    Please help me.

    Thanks in advance,

    A.Kavya

    Hello

    The new logical table is right click on the MDB itself, for the join you generally in the business model diagram (again right click on objects).

    Maybe it's better if you start from a kind of tutorial to at least have an overview of what is happening where (layer business and physical layer etc.).

    Take a look at what Oracle has available: Oracle BI EE 11 g

    And no doubt, it can be a good start: https://apexapps.oracle.com/pls/apex/f?p=44785:24:0:NO:P24_CONTENT_ID, P24_PREV_PAGE:9787, 2

Maybe you are looking for