Next in a table using the nested

Hi all

I have a dilemma, and I don't know how to solve. I use a nested table. I loaded the data from a table in the current collection. Now, I want to go to each line of the collection and some operations.
I used the following statement:

because me in 1... Tab.Count loop
/ * operations * /.
end loop;

The operations section contains a test, some time... loop condition and I need to be able to move to the next line of the collection while staying in this condition as:
all in tab (i) .field1 = v_var loop
...
Tab.Next;
end of loop

I tried to use then, but it doesn't work like that. Any ideas how do I do this?

Thank you
  idx := tab.next (idx);

Tags: Database

Similar Questions

  • Get the 500 error trying to create a table using the REST API

    Hello

    I tried to create a table using the REST API for Business Intelligence Cloud, but I got 500 Internal Server Error for a while now.

    Here are the details that I use to create a table.

    Capture.JPG

    and the json to create the schema that I use is

    [{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ["ROWID"]}]

    , {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['RELATIONID']},

    {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['ID']}

    , {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['RESPONDEDDATE']},

    {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [255], 'columnName': ['RESPONSE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_CREATEDDATE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_CREATEDBYID']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_LASTMODIFIEDDATE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_LASTMODIFIEDBYID']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_SYSTEMMODSTAMP']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [10], 'columnName': ['SYS_ISDELETED']},

    [{'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [50], 'columnName': ['TYPE']}]

    I tried this using postman and code, but I always get the following response error:

    Error 500 - Internal server error

    Of RFC 2068 Hypertext Transfer Protocol - HTTP/1.1:

    10.5.1 500 internal Server Error

    The server encountered an unexpected condition which prevented him from meeting the demand.

    I am able to 'get' existing table schemas, delete the tables, but I'm not able to make put them and post operations. Can someone help me to identify the problem, if there is no fault in my approach.

    Thank you

    Romaric

    I managed to create a table successfully using the API - the only thing I see in your JSON which is different from mine is that you have square brackets around your values JSON where I have not. Here is my CURL request and extract my JSON file (named createtable.txt in the same directory as my CURL executable):

    curl u [email protected]: password UPDATED h x ' X-ID-TENANT-NAME: tenantname ' h ' Content-Type: application/json '-binary data @createtable.txt https://businessintell-tenantname.analytics.us2.oraclecloud.com/dataload/v1/tables/TABLE_TO_CREATE k

    [

    {

    'columnName': 'ID',

    'dataType': 'DECIMAL ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': false

    },

    {

    'columnName': 'NAME',

    'dataType': 'VARCHAR ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    "columnName': 'STATUS."

    'dataType': 'VARCHAR ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    "columnName': 'CREATED_DATE."

    'dataType': 'TIMESTAMP '.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    'columnName': 'UPDATED_DATE ',.

    'dataType': 'TIMESTAMP '.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    }

    ]

  • Why I can't use the nested aggregate function?

    Hello Experts,

    Why I can't use the nested aggregate function? There is not an ora-00979 group by error of expression.

    Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    Select

       SUM (BOX WHEN (KSD_CREATEDATE BETWEEN TRUNC((KSD_CREATEDATE)) AND TRUNC(MIN(KSD_CREATEDATE)) +60) THEN 1  ELSE 0 END) AS col

    DE TABLE_3_4

    GROUP BY STC_FIRMANO

    Thank you

    GROUP BY will manage the SUM function, but the MIN is used incorrectly - use another SELECTION to get it, or work with only with a single line. Otherwise, you could do WITH... get the SUM of SELECT MIN...

  • Update a table using the clause

    Hello

    I want to update a table using the selected values.

    Cases in the sample:


    create table as empsalary)

    Select 1 as empid, 0 in the wages of all the double union

    Select option 2, the double 0);

    Data update are as follows

    with saldata as

    (

    Select 1 as empid, 5000 as wages, 500 as double pf

    Union of all the

    Select option 2, 10000,1000 like double pf

    )

    Select empid, salary saldata

    I tried the following query but does not work

    updated set of empsalary table (empid, salary) =

    (

    Select * from)

    with saldata as

    (

    Select 1 as empid, salary, 500 5000 as pf Union double all the

    Select option 2, 10000,1000 like double pf

    )

    Select empid, salary saldata

    ) sl

    where sl.empid = empsalary.empid

    )

    I use oracle 10g.

    Help, please.

    Krishna Devi wrote:

    Hello

    I want to update a table using the selected values.

    Cases in the sample:

    create table as empsalary)

    Select 1 as empid, 0 in the wages of all the double union

    Select option 2, the double 0);

    Data update are as follows

    with saldata as

    (

    Select 1 as empid, 5000 as wages, 500 as double pf

    Union of all the

    Select option 2, 10000,1000 like double pf

    )

    Select empid, salary saldata

    I tried the following query but does not work

    updated set of empsalary table (empid, salary) =

    (

    Select * from)

    with saldata as

    (

    Select 1 as empid, salary, 500 5000 as pf Union double all the

    Select option 2, 10000,1000 like double pf

    )

    Select empid, salary saldata

    ) sl

    where sl.empid = empsalary.empid

    )

    I use oracle 10g.

    Help, please.

    Thanks for posting creates table and test data.

    The error message would have helped because it's pretty obvious that this is the problem:

    Update table empsalary

    *

    ERROR on line 1:

    ORA-00903: invalid table name

    Just remove the word "table".

  • Creating external Tables using the EXECUTE IMMEDIATE in PL/SQL

    Hi guys,.

    I am trying to create an external Table using the EXECUTE IMMEDIATE in a procedure and I managed to compile and no errors were generated. But when I try to run it from sql using the exec command I get the following error:

    ------------------------------------------------------------------------
    ERROR on line 5:
    ORA-00911: invalid character
    ORA-06512: at "GEO. TEST_DDL', line 4
    ORA-06512: at line 5

    -------------------------------------------------------------------------

    I tried to check the whole statement to create the external table, but I can't find where is the error. Surprisingly, if I simply run the command table create external on sqlplus it works, but not a procedure.

    If anyone can help with ideas or experience?

    Geoffrey Kossami

    The error means that there is an identifier somewhere that starts with a nonalphanumeric. This is a typical mistake of editing. A procedure compiles correctly is not of course because the underlying dynamic sql running is OK. Which of course only be resolved when you try to run it.

    There is certainly a problem with the text you provide to be run as a piece of dynamic sql code. You should try to watch it with dbms_output and run this code in sqlplus. But your problem is with the code you run as dynamic PL/SQL, it is not itself compilable.

    Jack

  • Problem with update of table (using the subquery to retrieve value)

    Hello
    I update a table based on the value of the subquery.
    Here's the update statement.

    UPDATING temp xm
    SET xm.col1 = (SELECT DISTINCT col1
    Of
    (SELECT col1, col2 COUNT (col2)
    FROM table2
    WHERE col1 = xm.col1
    AND col2 = xm.col2
    GROUP BY col1)
    where col2 in (select... in the table3)
    )
    WHERE xm.col5 = < value >
    AND xm.col6 = < value >

    When I run this statement I get following error.
    ORA-00904: "XM". "" Col1 ": invalid identifier.

    Can someone help me why I get this error?
    Why doesn't the main table alias in the subquery?

    Is it possible to avoid this / re - write the query in a different way?

    Thank you

    Published by: user552703 on November 2, 2009 20:42

    You can nest only 1 level deep (referring to the table to be updated).

    Have you looked at using the MERGE command? It is "easier" perform updates of this nature, assuming you are using a recent version of Oracle (9 or MORE).

  • How to get the numbers to remember a list of answers column on nine or more tables using the same format

    I'm new to numbers but were mainly use it to organize only a simple way to display the cases that arise in a criminal background check. So for a table, I can type driving while license revoked (DWLR) as the load and from there on the charge will fill itself or offer similar responses after typing a single key.  A well appreciated time saver but problems I can sort and summarize the criminal history for 10 people or more at a time and need to do it urgently often.   However when I opened a new table I have to cross and type a new the precise wording of a charge, its disposal (Guilty, voluntary dismissal etc.)  and just know that there is an easy way for the numbers to know in a new table that, if finished it is a list annoyingly long term broken criminal code list and do not have to do that in each new table so that it can take.  I know I'm missing something very basic, but any help would save hours for me and the other poor interns who spend twice as long just to undestand the case and troubleshoot.  Thanks for all the ideas!

    David

    Hi D,

    The AutoComplete feature provides suggestions picked on data entered in the cells above the one you are working in. You can automate the process by preparing a "full menu" table containing ALL the possible inputs for each column in the rows below the header lines.

    The checkbox in cell A1 is a switch, is used to insert the word HIDE in the cell that contains the list of AutoComplete terms. Cells in this area are filled with bright red to draw attention to them when indicated.

    A rule to reorganize (shown and applied below) hiding these lines when the box is checked.

    Hide the lines does not affect the operation of auto-complete, as shown in the table below:

    When the form is competed, action depends on how the result will be recorded and filed.

    If there is no need to edit/modify the file, it can be converted to a PDF using the print dialog. This produces a copy of the displayed part of the document only.

    If the document will require more editing, you can remove the lines containing AutoComplete suggestions. Clear the check box, select all the red lines filled, click the triangle in the row reference tabs and choose Remove.

    Formula in A2 - A10: = IF(A$1,"HIDE","")

    Kind regards

    Barry

  • How can I resize the window of my table using the node of furniture? Thank you

    Hello

    I want to first the size of the window of my table using its property node but I can't put it to "write".

    If anyone knows if this is possible?

    Thank you

    User

    Hello

    Some properties are 'read only' and there is not that you can do about it.

    However, to set the size of your chart, you can use the "conspiracy area.size" (I don't know how it was translated into french) can be found here:

    Hope this helps

  • Excerpt from my table using the loop For

    Hello

    I have this loop to create a 2D array. The result is on the table below. I want that this 2D table should be fully completed and compiled, then it will be sent out of the loop.

    I don't want to extract the value of table 2D is a loop. This is the problem that I am facing.

    My ultimate goal is to extract the individual number of the final table of the 2D table line and be an entry for other functions.

    Please help me. Thank you

    PX

    Hi PX.

    Here's a solution without using screw express

  • "missing the SELECT keyword" error during an insert into the temporary table using the blob value

    I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.

    How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)

    with cte as)

    Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob

    )

    create table new_table as

    SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings

    E ETC

    ----------------------------------------------------------------------------------

    BLOB data - value - which is

    <? XML version = "1.0" encoding = "ISO-8859-1" ?>

    - < Preferences >

    < time zone > America/New_York < / > zone

    < displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >

    < local > Spanish < /locale >

    < DateFormat > JJ/mm/aaaa < / DateFormat >

    < timeFormat > hh: mm aaa < / timeFormat >

    < longformat > Long_01 < / longformat >

    < doubleformat > Double_01 < / doubleformat >

    < percentformat > Percentage_01 < / percentformat >

    < currencyformat > Currency_01 < / currencyformat >

    < / Preferences >

    A WITH clause that must immediately precede the SELECT keyword:

    SQL > create table t:

    2 with the o as (select double dummy)

    3 select * West longitude;

    Table created.

  • Loading SQL tables using the rules file

    Hi Experts,

    I have a doubt. In our project, we have a maxl command that imports the essbase data cube using tables sql below.

    import data from database VodaPln.wrkforce

    log in as 'devhyp' identified by 'password' using the rules_file «WFDataLoad.rul» Server

    My doubt is here in this maxl, we define the schema and password name ('devhyp' identified by 'password'( ), but we do not give the name of the table. So, how will the maxl understand what table to extract the data. Please let me know in case I'm missing something and need to check out somewhere else.

    Thanks and greetings

    The actual SQL statement is in the State of charge, IT will set the columns, tables where the conditions and joins. The first parameter is the name of user who may or may not be the schema name. This information is containd in the State of charge, but also an ODBC or CLI connection

  • pass the binding variable to the af:table using the menu drop-down

    I need to create an af:table to pull all employees belonging to a Department. I created the table based on a viewobject.

    The query in the view object has a variabe bind, for example:

    Select * from employee where deptname to (select deptname of Department where deptid =: deptid)

    My question is how to get the deptid selected in a drop-down list value passed to the query of the table of the adf?

    The user, what version jdev you use?

    Where is the location THAT LOV located on the page? Once you have the service ID, you can use the executeWithParams to run the query and display the result in the table.

    If this isn't what you want to elaborate on the use case.

    Timo

  • Inserting data in several related tables using the database

    Hello world
    I'm working on a BPM application using Oracle BPM 11.1.1.5.0 and JDeveloper 11.1.1.5.0.

    In my database, I have two tables, loan and guarantee that are related by a field named employeeID (PK on loan) and FK in warranty.
    Each line can have several lines of guarantee.

    At this point, I'm doing an entry form for the user to insert data in the two tables.

    I did successfully before with a single table that has no relations.

    The way I'm doing here is, after the creation of the database successfully adapter, a type of LoanCollection is created in the types module, which can be used to create business objects and data objects of.

    The problem is when I create an object of type loanCollection process data and then create a UI generated automatically on that basis, only the fields in the primary table (the Table of loan) appear in the form.
    On the other hand, if I create a business object based on the LoanSchema, the form for all of the two tables is created automatically (the loan as a form, the guarantee in a table), but then, when I try to access it in the section processing service mission which calls the database adapter, I have no access to such.
    In fact, the only type which can be used in the service task is the process based on the loanCollection data object.

    To summorize, I have to use the type of business for my UI object to include all the fields in both tables, so I have to use the data object from the collection process in the transformation of service task dialog box.
    And I can't find a way to map to another.

    Can someone help me with this please?
    Thank you very much

    Try to follow these steps.

    1. create a new module in your catalogue our BPM project management section
    2. in this new module create 3 Business Objects - (LoanBusinessObject, GuaranteeBusinessObject and GuaranteeArrayBusinessObject)
    3. Add the attributes appropriate to the LoanBusinessObject and the GuaranteeBusinessObject so that they mimic your database tables, then to the GuaranteeArrayBusinessObject add an array of type attribute GuraranteeBusinessObject
    4. now you need to create two process data objects, type loanProcessObject LoanBusinessObject and type guaranteesProcessObject GuaranteeArrayBusinessObject
    5. as inputs to your human task adds the loanProcessObject and guaranteesProcessObject, these should now be available in your data controls and can be used to auto generate the form
    6. in your dbadapter you'll then use XSL Transformation and use for each so that it will write the data to the ready table and all the line items of warranty for the warranty table.

  • Build the value of 100 mb of data in the table using the loop

    DB version: 11.2

    How can I create about 100 MB of test data in a table using minum number of records.
    If I use the below for loop. It takes 100,000 records to fill only 2 MB.
    SQL> create table a2 (mynum1 number, mynum2 number);
    
    Table created.
    
    begin
    for i in 1..100000 loop
        insert into a2 values(i,i*2);
    end loop;
    end;
    
    
    select segment_name, bytes/1024/1024 MB from dba_segments where segment_name = 'A2' AND owner='SCOTT'
    
    
    SEGMENT  BYTES/1024/1024
    -------- ---------------
    A2                     2

    Hello

    Is that what you are looking for?

    SQL> CREATE TABLE tbl1(c1 CHAR(1024));  -- ~1KB per row
    
    Table created.
    
    Elapsed: 00:00:00.00
    SQL> INSERT /*+ APPEND */ INTO tbl1 SELECT 'X' FROM dual CONNECT BY LEVEL < 100000; -- 100K rows * 1KB = 100MB + some additional overhead
    
    99999 rows created.
    
    Elapsed: 00:00:13.02
    SQL> SELECT bytes/1024/1024 MB FROM user_segments WHERE segment_name = 'TBL1';
    
            MB
    ----------
        113.75
    

    Lukasz

  • How to create the Table using the column Drag and Drop feature

    Hello:
    I'm new to Data Modeler tool Oracle SQL dev and would like to know if there is a way to create a new table by reusing existing columns or groups of columns. The idea is to maintain consistency and save time of table design. If the columns created previously can be reused and require, drag and drop column in the right pane, then only new columns must be created manually.

    Any thoughts on this will be appreciated.

    Thank you!

    Yes - just change the name of the model table in the script (t_name = "table_template") then save this new transformation for later use.

    I don't know how to apply only some of the tables. Seems like something you could do to a secondary view level?

    Perhaps someone else on the forum can advise how to change the script to work on a subview only instead of the whole model.

Maybe you are looking for

  • Portege A200 model Japanese cx3216ldsw

    Hello. I bought this laptop in the Japan and he brought to the United Kingdom. Well the Japanese makes me crazy - I need to download an ENGLISH version of configfree. Q1 - What is the latest version of free config and it ismore recent than the one on

  • WIFI does not work on my Satellite L650D

    Hi all... On my laptop, the wireless light is orange and won t work...When I got the laptop connected to the Ethernet cable, it works fine but the minute that I remove it, it turns off.Anyone know my problem? Thank you

  • [Satellite was?] Broken power adapter

    Hello I bought a few years ago the computer satellite phone has... something.But mine adapter is 'dead' / broken. The end on the cable, where you have plugged the adapter in your laptop is broken.Should I go buy a new adapter or a new cable? And what

  • Error of vi-1074395247 IMAQ learn model 2.

    Hello Development environment: LabVIEW 2012 32-bit (12.0f3) Vision 2012 Description: Can someone please shed some light on what types of descriptors of the KING are allowed for IMAQ learn ringtone 2?. Only certain KING types allowed for this VI, or y

  • How to install two operating systems?

    win xp install All microsoft can do is talk talk talk you don't give any info how do you just say now with windows xp you can install two os on your computer. Worthless!  How are you stupid?