Oracle collection question

Hello

can someone help me with the following pl/sql code?

I got the error: PLS-00306: wrong number or types of arguments in the call to "TABTYPE".

{code}

create or replace package test_pkg

is

type offertyperecord is (identification number, varchar2 denumire (150));

tabtype type is the offertyperecord table;

tabtype TT;

procedure populateoffer;

-function getoffer tabtype return pipeline;

function getoffer return tabtype pipelined;

end;

/

create or replace package body test_pkg

is

procedure populateoffer

is

Start

SELECT id, denumire bulk collect in tt

of absence;

/*

I'm looping 1.tt.count

dbms_output.put_line (TT (i) USER.USER);

end loop;

*/

end;

function getoffer return tabtype pipelined

as

Start

for me in tt.first... loop of TT. Last

line (tabtype (user.user tt (i), tt (i) .denumire));

end loop;

return;

end;

end;

{code}

Thank you

Coco

Try to change your tax return line to the following:

pipe row(tt(i));

When you work with pipeline table functions the function return type is the type of array, but the conduct of the line returns individual records of this type of table, so it should be a value of type record past not a value of type table.

Your tt variable is of type tabtype, so an individual record in tt will be of type offertyperecord, the expected line type.

Tags: Database

Similar Questions

  • Create the View object that is based on Oracle Collection

    Hello

    How to create a display based on oracle object custom collection? The adf document mentions on the creation of view with data ResultSet object by overriding a few methods of frame. One of these methods is:

    protected ViewRowImpl createRowFromResultSet (object qc, ResultSet rs)

    The oracle collection is generated using JPublisher, and basically it's type of oracle TABLE.

    Thank you very much!

    I'm going to assume that your Collection is out by a table function - i.e. "FUNCTION my_function(my_parm IN VARCHAR2) RETURN my_collection_type; If this is true, then you can make SELECT it for your VO like this:

    SELECT *
      FROM TABLE(my_function(:my_parm))
    

    You can even create a variable binding for: my_parm. You will get an attribute for each item in the folder, or if the collection is a collection of a scalar type (such as VARCHAR2), an attribute (there is a fixed name for this attribute, but I don't remember what it is offhand).

  • VMWare Oracle network question

    We currently have an Oracle server, that has a connection LACP on 4 network cards to 1 GB for a netapp FAS2040.   Unfortunately it is a failure then we will create a virtual machine.  We have it online right now, but I have a question.  VMWare server has 4 1 GB NICs to shared resources on a single VMXNET 3 NIC will be able to push as much traffic that may 4 NICs trunked?  Or do I need to create a similar configuration?  Has anyone else made something like that?

    Thanks in advance.

    Vmxnet3 supports up to 10 Gb/sec transfer rate. So you can have your uplinks on LACP certainly and present 1 virtual nic VMXNET3 virtual machine speeds, even if your bottleneck will most likely be that you'RE Ops / s disc.

    See this document for more detailed information on the performance of VMXNET3

    http://www.VMware.com/PDF/vsp_4_vmxnet3_perf.PDF

    Kind regards

    Rick

  • Oracle license question

    Hello

    I've worked with oracle rarely, I connected oracle remotely.

    I want to install oracle 10g R2 in my laptop. I have to buy a license of the company oracle, if she is so please help me whee I have to buy a license to install in my laptop.

    Thank you.

    Best regards
    Christopher

    user13360241 wrote:
    Srini thank you and EdStevens for more information provided me in detail. I just want to use for learning purposes only.

    My operating system is Windows 7 Ultimate(64-bit). I visited the page developer license and so Oracle 11 GR 2 database page, I'm going with 11 GR 2 10 gr 2 is not available/unsupported.

    As a little confused on the editions, please I want to know that something Oracle Database 11g Release 2 (11.2.0.1.0) contains Standard and Enterprise Edition and Oracle Express Edition; This means that I can install any edition which is free for learning.

    Really, I appreciate and also thank you for your time and effort.

    Best regards
    Arshad

    Citing once again, the download page:

    + All software downloads are free, and most come with a developer license which allows you to use full versions of the products without charge while developing and prototyping your applications, or strictly self-educational purposes.* +.

    Perhaps the part of the sentence "and * more * come with a developer license" (underlining) leaves some questions that some products may not be covered. I don't know what would these products but I've never seen someone ask the commodity database.

    Regarding editing, you... once again, it's what you want to achieve. If you want to learn sql/plsql from the point of view of the developer, one of them will do. If you want to learn from a DBA perspective, you want to the Enterprise edition.

  • Oracle SR - Question

    Dear people,

    I have a question on how Oracle Service request work

    I understand that we breed of SR for Troubleshooting a wide range of technical issues. Oracle provides assistance to complete a task via a service request?

    Published by: DBA112 on December 12, 2012 05:18

    Published by: DBA112 on December 12, 2012 06:09

    Hello

    Personally, I'd also much research as possible in the docs and online and writing about questions that I had. Can I make a support request and seek clarification on the points you need. Usually, they will be able to provide you with links to documentation, and if not, they should be able to provide at least a general idea on what to do.

    Good luck!
    Rob

  • Oracle BI question

    Please, what is the difference between the oracle BI and Oracle BI publisher desktop publishing server?

    Thank you

    BI Publisher:
    -Oracle Business Intelligence Publisher offers you the most effective and scalable reports available for complex and distributed environments.
    BI Publisher Desktop:
    -Oracle Business Intelligence Publisher provides design Microsoft Office-based tools that automate the design process to create templates for Oracle BI Publisher.
    -Of Oracle BI Publisher of Microsoft Word Add-in model generator facilitates the development of patterns of provision RTF
    -Model Viewer allows you to preview your model in all output types supported with your sample data.

    The following link will help you learn more:
    http://docs.Oracle.com/CD/E23943_01/bi.1111/e22257/TOC.htm
    See you soon,.
    ND
    Use the buttons "useful" or "correct" to award points to the answers / mark the thread as answered, if your question is answered.

  • G 10 Oracle interview questions

    Hello

    Please post the link for oracle 10g interview questions. IAM a developer (starter). Please help me.

    Thank you and best regards,
    Anill

    Published by: Anill February 10, 2012 23:46

    This should be useful.

    http://www.geekinterview.com/interview-questions/Oracle/PL-SQL

  • Oracle BI Question products

    Hello

    I have two question about Oracle Business Intelligence product.

    Please correct me if not true.

    OLIVIER exist only in 3 products:

    1 - oracle Business Intelligence Suite Enterprise Edition more.

    2 - oracle Business Intelligence Enterprise Edition Server.

    3 - oracle Business Intelligence Standard Edition One

    What is Oracle Business Intelligence Foundation?


    And another question...

    Scordcare, is a product or a component of OBI?

    I have a bought the Oracle Business Intelligence Suite Enterprise Edition Plus, and that means can I use a scordcare?

    And the Standard version or server too?

    Best regards

    You also want to add the Oracle BI Foundation Suite to the list, which may be what you mean by Oracle BI Foundation, but I am not sure.

    Following the Foundation, with a license for Oracle Essbase and scorecard and strategy management, see more here,
    http://www.Oracle.com/us/solutions/ENT-performance-bi/business-intelligence/bi-Foundation-Suite-data-sheet-170919.PDF

  • Oracle Rac Question

    Hello

    I have a consult. I have 3 nodes in Oracle RAC and I added a knot more but his earpiece is down and users can access on that node. However, yesterday when I was tracking I noticed 4 node had connections that have no one OS user. Is possible that there was a balance between nodes internally?

    Note: in the TNSNAMES file. Customers ORA reference to the new node, but in the TNSNAMES file. ORA nodes Yes.

    Thank you

    You already asked this question in the forum of the database {message identifier: = 9558896}.

    PLEASE DO NOT DUPLICATE MESSAGES!

  • Oracle 8i Question compilation error

    I used the following code before on a 10g database but I have problems make it compile on 8.1.7.4 Im sure it should work even thought.
    ______________________________________________________________________________________________________________
    create or replace procedure bulk_load as

    cursor c1 is
    Select * from schema.table;

    TYPE t_select IS TABLE OF c1% ROWTYPE;
    t_data t_select;


    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 COLLECT LOOSE t_data LIMIT 1000;
    FORALL i in 1.t_data. COUNTY
    INSERT INTO VALUES (i) t_data schema.table;
    When exit c1% NOTFOUND;
    end loop;
    commit;
    Close c1;
    null;
    end;

    _____________________________________________________________________________________________________________
    Row: 13 column: error 28: PLS-00597: expression 'T_DATA' in the list IS of the wrong type
    Line: column 13: 1 error: PL/SQL: statement ignored
    Row: 15 column: error 63: PLS-00518: INSERT statement that requires the VALUES clause contains a list of values parenthesised
    Row: 15 column: error 2: PL/SQL: statement ignored
    Row: 15 column: 2 error: PLS-00435: without LINKING DML statement to BULK cannot be used inside a FORALL
    Row: 14 column: 11 error: PL/SQL: statement ignored





    Questions comments would be useful

    Thank you

    Published by: user11937852 on January 17, 2011 11:30

    If I'm not mistaken COLLECT in BULK must be done by column in 8i:

    Open c1;
    collect the fetch c1 into loose in collection_1, collection_2,...;

  • Collections question

    I have a table called Test1 and below the structure. This table has only one column A

    A
    1
    2
    3
    4
    5
    6
    7

    I have a table named Test12 and below the structure. This table contains two columns A and B
    A AND B
    1 10
    2 20
    3 30
    4 40
    5 40

    I would write the output column B values distinct 10,20,30,40,6,7 that I implemented in a procedure. There are a few other commits. I think that the request is not correct. The output is derived based on the join between the Test1.A = Test12.A and Test12.B selected column. But I don't want dup value as 40. When I reach there there no match for the 6 and 7 in the B test, I want to have that in the output. I hope that we can manage using exception block no data available.
    I used the one collection and populated table Test1 and loops through the collection for each line and Assembly test12. A column and but I get dup values during filling B collectine with the desired output. I'm almost ready. I wrote the following code block. Please give me the solution.

    declare
    cursor a_cur is select * from test1;
    type test1_tab is table test1% rowtype index by test1.a%type;
    type test12_tab is table of the test12% rowtype index by test12.b%type;
    v_test1_tab test1_tab;
    v_test12_tab test12_tab;
    x varchar2 (10);
    REC a_cur % rowtype;
    Start
    Open a_cur;
    loop
    extract in rec a_cur;
    When the exit a_cur % notfound;
    v_test1_tab (a_cur % RowCount): = rec;
    end loop;
    close a_cur;
    I'm in v_test1_tab.first... v_test1_tab. Last
    loop
    Select b to x test12 where a = v_test1_tab (i) .a;
    If v_test12_tab.count = 0 then
    v_test12_tab (i) .b: = x;
    on the other
    j in v_test12_tab.first... loop v_test12_tab. Last

    -I think that I am not comparing straight and even above the loop also
    If v_test12_tab (j) .b = x then
    null;
    on the other
    v_test12_tab (i) .b: = x;
    end if;
    end loop;
    end if;
    end loop;
    I'm in v_test12_tab.first... v_test12_tab. Last
    loop
    dbms_output.put_line (v_test12_tab (i) .b);
    end loop;
    end;

    Published by: ricotta November 3, 2010 18:33

    Hayet wrote:
    Thanks, I'll try to modify the code. This is useful for me. But I have a question. I will a charge in collection A column and compare one collection each item with another column, I get match, I'll put the value of column X (parent) in the collection. B if I get the same value again in the X column, I won't put in the collection b. (just comparison of collection). is it not possible?

    It is possible, but it is MUCH less effective than the use of SQL (where you can).

    Perhaps you could explain why the query I posted before is unsuitable for your needs? Based on the 2 tables that you mentioned and the output you need, it seems to be the ideal solution.

    Not going to try to do what you can in SQL with arrays and loops and comparisons
    (1) increase the complexity of your application (this prevents the maintenance)
    (2) reduce the performance of your application

  • Oracle - the question of the integration of MS Access

    Guys,

    Yesterday I asked the question of the integration of Oracle and Access, and I got the answer through oracle heterogeneous services, you can connect to ms access to insert/update of the data.

    I had another thought on direct vs. indirect integration method.

    1. with the help of XML to send and receive data between oracle and MS. Access.
    Have a specified location where oracle will generate xml file and within the specified time interval ms access checks the file and the process
    This file. Even reverse access can generate an XML and oracle can process this file with working hours.

    2. using heterogeneous services - seems to be a free service as I could find MS Access driver online

    If immediate information is required in the two system then I have no choice but to use heterogeneous services? * *

    If information can wait for labor scheduling, I intend to propose the approach 1 (generate/process xml file). If both systems are not really dependent on each other

    Everything I need to examine or missing / or one is better than another?

    Another approach would be a JDBC connection: load in the BDD Oracle JDBC driver, then opening the link to MS Access using JDBC. The disadvantage of this solution is that you all on your own code.

    While a 'real-time' ready-to-use application, DG4ODBC (HSODBC product tracking) is the right choice.

    As MS Access can also get data via ODBC, why not link tables Oracle in MS Access and loading of XML content in MS Accesss using a scheduled task, you can trigger then just selects and inserts. For this approach, you just need to have an ODBC Oracle driver installed where your MDB file.

  • Database Oracle OATS question

    Hi guys,.


    I work with Oracle OpenScript to generate the Script Application Siebel. For many reasons, I choose in BTA Bank of data to use for an incoming test.

    Is it possible to define in BTA camps sources (CSV file) which matches the database alias defined in OpenScript, and used to map the name of user and password for example? Thanks to this, I might be able to run subsets of SEEN on different data sets (but still using the same Script)

    Hope you understand my question :)

    Thank you

    Anthony

    Anthony

    You cannot add data in BTA only banks in OpenScript.

    You can get the same thing by using the following techniques:

    (1) - have X many different scripts, you can just do a backup as in a manuscript to clone, and then change the database.
    (2) - have a different database file that you manually change.
    (3) - select the file database in Code view.

    And finally, you can select a range of values to use in BTA, so you could use a database file and set the first 100 users to have a different role that the second series of 100 users. You can then select range he in BTA just click the database icon in the view of scenario in BTA.

    Concerning

    Alex

  • Cloud services for the Oracle document | Questions

    Dear Experts,

    We are just exploring the possibility/to use cloud-based document oracle for our departure services

    Our business case is that we need to share documents with users outside of the Organization external/vendor

    How to share content with external parties and retain control and safety?  -What will be the impact of the cost of storage? where go I find this information


    kindly let me know your inputs


    Best regards, SG

    For details, please visit suite documentation URL:

    http://docs.Oracle.com/cloud/latest/documentcs_welcome/WCCCU/GUID-681DE8CD-8B4E-4746-94F5-26A3E6C6BEAA.htm#WCCCU3295

    http://docs.Oracle.com/cloud/latest/documentcs_welcome/WCCCU/GUID-F8AC9F4A-0C48-4438-9FDD-554336EECCD0.htm#WCCCU4308

    http://docs.Oracle.com/cloud/latest/documentcs_welcome/WCCCU/GUID-4C699734-1DF5-41C6-B2E6-55BCA124D62D.htm#WCCCU4051

    http://docs.Oracle.com/cloud/latest/documentcs_welcome/WCCCU/GUID-1EEA4881-3FE0-4A4A-a739-B2856888FEEE.htm#WCCCU4218

    For your information, you can also consult the technical and functional details on Cloud Computing document service by visiting: http://docs.oracle.com/cloud/latest/documentcs_welcome/index.html

  • Benchmark Oracle files questions

    I need reference System.Data.OracleClient using Oracle.DataAccess.Client in Visual Studio 2005

    is it necessary to have two files? I'm confused

    as I remove this reference System.Data.OracleClient is show below highlights the formname System.Data.OracleClient . Designer.cs file, but if I replace it with Oracle.DataAccess.Client

    It is to accept, but finally I run my app show

    Error2No overload for method 'OracleParameter' takes arguments '8'

    This is one of the lines in this file, I changed

    This ._adapter. Parameters.Add (new Oracle.DataAccess.Client.OracleParameter ("PASSNUMBER", Oracle.DataAccess.Client.OracleDbType.Varchar2, 0, System.Data.ParameterDirection.Input, "PASSNUMBER", System.Data.DataRowVersion.Current, false, null));

    What to do... someone please guide what I'm doing wrong here

    System.Data.OracleClient is the provider for Oracle Microsoft .NET.  If you want to use, you must add a reference for System.Data.OracleClient.

    Oracle.DataAccess.Client is the .NET for Oracle Oracle provider.  If you want to use it, you add a reference to Oracle.DataAccessClient.

    While you can use both at the same time, it's usually one or the other.    You don't need to include one to use the other.

    It is true that there is no 8 parameter for the Oracle OracleParameter object constructor.   Here are the choices: http://docs.oracle.com/cd/E11882_01/win.112/e18754/OracleParameterClass.htm#i1011127

    So most of the time from Microsoft and Oracle .net objects share the same signature, not all do.

    It will be useful,

    Greg

Maybe you are looking for

  • Satellite A300 (PSAG8E) - What's new in 1.9 BIOS?

    Hello I have a PSAG8E of the A300, and I would like to know what news between 1.7 and 1.9 BIOS?The new BIOS can change the fan control? On my A300, he's so strong. Thanks, looks, cricri975.

  • Satellite P850 - right USB ports stopped working

    I have a new P850 Satellite, after a short period, that the two right usb ports stopped working, I had only a wireless mouse connected to them at the time. Is there a reset for these ports, I tried to uninstall and reinstall, no change. Anyone has an

  • Permissions to change the name of the computer in Windows XP

    I have a user who I want to be able to have the permission to change the name of the computer that is connected to the domain.  When I try to change the computer name I enter the username and password in the popup box and then I get the following mes

  • Computer locked me

    I started my top desktop PC running XP and it went to the log in page.  I don't have a pass word together to the top on this computer, so it was new...There is no place to insert a password and I just clicked on my profile.He pointed out that it was

  • How to upload photos on facebook from my computer?

    How to upload photos on facebook from my computer?  How to install Windows live essentials.  Every time I try it tells me that a different version is installed and cancel.  Do not know how to do this.