Adding records to a collection

Hello

I have a collection of say, a. I executed a select... BULK COLLECT IN A... and "n" recoveries recorded in A. is it possible for me to run a SELECT... BULK COLLECT IN A and add the records in a. (I need the resulting records of the two queries in the collection).

Thanks in advance,
Thomas Titus

I guess that you need at least two collections: then you would

 c2  := c1 multiset union all c2;

Otherwise you must combine two queries with a union of all and bulk collect in this one...

Tags: Database

Similar Questions

  • Photo not added to the quick Collection when you click marker

    Recently I have not been able to add photos to a quick collection, when you click on the marker. The marker provides information, but the photo does not appear in the quick collection. This problem occurred at the same time, I couldn't remove the photos in the quick collection that had been added. I had to remove these photos using the menu system. I've upgraded to the new version of Lightroom 5 yesterday thinking that would solve the problem. I still have the problem so I wonder if this is a setting that I missed. Quick collection markers button is enabled in the display options and the button and change when you click them... The thumbnail of the photo is not added to the quick collection.

    It seems that you no longer have the quick Collection, referred to as a collection of target. Is there a small symbol '+' next to the name of the collection? If this isn't the case, you have another collection in your designated collection list.

    To fix, right-click the name of the quick Collection and click the option "set as target Collection.

  • Adding images to the Collection of books [was: Blurb book Question]

    I'm doing a book with Blurb from a collection of photos in LR. I've added two pictures to the collection I wanted to add to the book, but they do not appear when I pass 'Library' to 'book '. How can I make it appear? Thank you!

    Hi sunlovinggirl,

    Once you add the images to the collection of books, they appear on the film when you return to the book Module so that you can add them to your book pages.

    You should look for them in the film.

  • Adding images to the collection

    I'm doing the simplest thing, without success. I have created a collection and want to add twenty images to it. In the grid view, I select my twenty photos, but can not drag and drop them in the collection folder. I right clicked the folder, looked in all the menus, but can find no reference to adding photos to an existing collection. Obviously, I'm missing something very simple, but I don't know what it is.

    Thanks in advance,

    Gary

    You must drag from the center of the images in the collection. Gray no surrounds.

  • Adding records int BLOCK in a loop

    Hi all

    I have problems in the following ways:

    When I press a button, I request a cursor that returns several records, according to certain values on this record that I have to add, or not a block.

    Somoeone please tell me how to do, I do:

    GO_BLOCK ('BLOCK');
    FOR reg cursor
    LOOP
    ..
    ..
    If s = reg.value"then
    create_record;
    : BLOCK. VALUE = S ';
    end if;
    ..
    ..
    END OF LOOP
    close the cursor;
    Exception
    while others
    close the cursor;


    THX in advance!

    The problem that I feel is the FRM-40102.

    The "FRM 40102 Records must be inserted or deleted everything first" error implies that you already have a line/record of "New" in your form so that when you call the CREATE_RECORD integrated forms you said that you have not met the minimum values required for the current 'new' recording you can not create a new.

    Frm40735 suggests (good choice of name, incidentally), rather than using the Create_Record, I would recommend that you check if the line the cursor is a new record before attempting to create a new record. Your code should look like this:

    GO_BLOCK('BLOCK');
      FOR reg in cursor
        LOOP
        ..
        ..
        if reg.value = 'S' then
          If (:system.record_status != 'NEW') THEN
            create_record;
          END IF;
        :BLOCK.VALUE = 'S';
        end if;
        ..
        ..
      END LOOP
      close cursor;
    Exception
      when others
        close cursor;
    

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Adding photos to a collection.

    I tried to drag a group of selected photos in my catalog to an existing collection, and nothing happens.  Is there another way to add photos to a collection in addition to drag / drop?  What should I do to make this work?

    When you drag move, you need drag start the operation by pointing your mouse in the middle of the photo and not in the rectangle to the photo.

  • Adding record helps the dynamically nested table

    Hello guys im trying to add records to a nested table plsql dynamically. Here is my code that only adds a record. I can not figuered on why it's not more then add one record to the nested table. I think I would say at the table to update the index and insert the new index but I'm not sure on the index can someone throw me a BONE.
    I also tried the records, but I seem to be facing the same problem.
    create or replace
    PROCEDURE QUICKTEST AS 
    BEGIN
    /*declare and array to loop through. to write error log.*/
    declare
    TYPE local_table IS TABLE OF VARCHAR2(30);
    acct_code local_table;
    
    
    TYPE rec_type IS RECORD (       -- local RECORD type
        f1 INTEGER,
        f2 VARCHAR2(4)
      );
      r2     rec_type;                -- local type
    
    num number(17):=0;
    
    begin
    FOR Lcntr IN 1..20
    LOOP
        
        
         acct_code := local_table ('I');
         r2.f2 := num+1;
        
    num:=num+1;
    
    END LOOP;
    
    END QUICKTEST;

    I think you are looking for something in the lines of...

    CREATE OR REPLACE PROCEDURE quicktest
    AS
       TYPE local_table IS TABLE OF VARCHAR2(30);
    
       acct_code   local_table  := local_table();
    
       TYPE rec_type IS RECORD(   -- local RECORD type
          f1   INTEGER
         ,f2   VARCHAR2(4)
       );
    
       TYPE rec_type_arr IS TABLE OF rec_type
          INDEX BY BINARY_INTEGER;
    
       r2          rec_type_arr;   -- local type
       num         NUMBER(17)   := 0;
    BEGIN
       FOR lcntr IN 1 .. 20
       LOOP
          acct_code.EXTEND;
          acct_code(lcntr) := 'I' || lcntr;
          r2(lcntr).f1 := num + 1;
          r2(lcntr).f2 := 'J' || TO_CHAR(num + 1);
          num := num + 1;
       END LOOP;
    
       DBMS_OUTPUT.put_line(acct_code.COUNT);
       DBMS_OUTPUT.put_line(r2.COUNT);
    
       FOR i IN acct_code.FIRST .. acct_code.LAST
       LOOP
          DBMS_OUTPUT.put_line(acct_code(i));
       END LOOP;
    
       FOR i IN r2.FIRST .. r2.LAST
       LOOP
          DBMS_OUTPUT.put_line(r2(i).f1 || ' :: ' || r2(i).f2);
       END LOOP;
    END quicktest;
    /
    
  • Adding blank lines to collections is displayed in an area of report

    How can I add blank lines to a collection that appears in a report from the region? I am viewing a collection area of report and have created a button 'Add as many lines' in the context of this region. I would like to add blank lines to the collection and displays the region again when the user clicks this button. Is this possible in Apex 4.0?

    Thank you

    Salome

    Hi Marc,

    Of course, this is possible.

    Pretend I'm a before the process of header on my page that creates my collection like this:

    BEGIN
       IF NOT APEX_COLLECTION.COLLECTION_EXISTS('EMP') THEN
          APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B (
               p_collection_name => 'EMP',
               p_query => 'SELECT EMPNO, ENAME FROM EMP');
       END IF;
    END;
    

    And I have a report like this region source:

    SELECT APEX_ITEM.TEXT(1, c001) empno,  -- be sure to define column as Standard Report Column
           APEX_ITEM.TEXT(2, c002) ename   -- be sure to define column as Standard Report Column
      FROM apex_collections
     WHERE collection_name = 'EMP'
    

    Then I can set a button called Add Row and made it to trigger a process of PL/SQL like this:

    APEX_COLLECTION.ADD_MEMBER(p_collection_name => 'EMP');
    

    You can improve this option to add a set number of lines by calling add_member in a loop, or go further and have an element of the list with values of 1, 2, 5 etc., so that the user can select the number of lines to add before clicking on a button to add lines.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

  • Adding records

    How to add records to another table that is bound by the field used for the id of another table?

    I have two tables have been created.  the first with just the id and a field for the name of the employee. the second table contains the fields IDs, used, date and time.

    the id of the first table is related to the employee of the second table.

    Thanks for the help

    I am currently out of the office. It will work, but only if the reference to the 'Table1.Row1.employeeID' object is to your hierarchy.

    See here for info/PDF on referring to objects: http://assure.ly/kUP02y.

    Niall

  • Adding to an existing Collection

    In LR3 is drag / drop the only way to add a photo to an existing collection?

    Thank you

    Tom

    Win 7

    Alternatively, you can right-click a collection and set it as the target collection, then use the B button to add to this collection.

  • Error adding items in a collection ArrayCollection.

    Hello

    I created an ArrayCollection collection and try to add items using ArrayCollection.addItem ("NewElement");

    In the answer it gives me a compilation showing error
    "Variable"NewElement"is not defined.

    var myArrayCollection:ArrayCollection = new ArrayCollection();
    myArrayCollection.addItem ("NewElement");


    Can someone please let me know how to solve this problem?

    Thanks in advance.

    The lines of code you posted seem to.

    Which line the error tip you?

    It seems that you forgot the quotes somewhere, but probably not to the level of the lines that you have posted.

  • Empty Collection records

    Hello

    I followed the incorrect process when you move the Lightroom Catalog and files as well as all the photo of a disk external hard drive and as a result records in the Collection are always on display, but are now empty (basic Collections not smart Collections).

    I reconnected it to the catalog in Lightroom in its new location external drive and all the pictures show as it should I think, with side of stars used. But I deleted the photo hard drive files that were on file with Lightroom and added in their new location of external hard drive - I realize now, I should have just search for them in their new location through existing records that showed.

    Please can someone tell me if there is a way to get the images in the Collections without having to add them again from scratch? Is the collection of information stored in the catalog and is at - it a way to achieve this?

    Thank you very much

    If it is still in the trash, it out of there! You can solve your problems by using this copy (and not on the external hard drive that has no collections)

    The procedure is to copy (and not move) the file catalog to the external hard drive, open it and then reconnect the photos (as explained here: Adobe Lightroom - find folders and files moved or missing). No imports! Do not import your photos!

  • Collections - Photos in the order that they were added?

    I wish that my photos in a collection to stay in the order that they were added to the collection.

    Is this possible?

    They always seem ordered by date and I have to manually re - order.

    Thank you!

    OK - I think I thought about her.

    In order to keep the photos in a collection in the order that they were added to the collection, you must set the sort order of the collection to the 'user' order before adding photos to the collection.

  • the use of collections, copy a record with children/grandchildren

    I understand that loops FOR cursor are not as good as the use of collections, and now I need to convert some of my code accordingly.
    I've been doing a bit of good to read the documentation and have not yet encountered examples of the situation that is so prolific in our system; namely, someone wants to make a copy of a record, with its outbuildings down a few levels.

    Here's what looks like a typical of this instance (except that everything is in packages). Take the 3 tables: grandparent_table, parent_table and child_table, with primary keys being gp_id, p_id and c_id respectively (and related as one might guess these names):

    create or replace procedure p_copy_record (p_gp_id in grandparent_table.gp_id%type)
    is
    cursor c_parent
    is
    Select *.
    from parent_table
    where gp_id = p_gp_id;

    v_gp_id grandparent_table.gp_id%type;
    v_parent_id parent_table.p_id%type;
    Start
    Select grandparent_seq.nextval
    in v_gp_id
    Double;

    insert into grandparent_table
    Select v_gp_id,
    other_columns_here
    of grandparent_table
    where gp_id = p_gp_id;

    for r_parent loop c_parent
    Select parent_seq.nextval
    in v_parent_id
    Double;

    insert into parent_table)
    P_ID,
    gp_id,
    other_columns_again)
    Select v_parent_id,
    v_gp_id,
    r_parent.other_columns_again;

    insert into child_table)
    C_ID,
    P_ID,
    other_columns3)
    Select child_seq.nextval,
    v_parent_id,
    other_columns3
    of child_table c,.
    where parent_id = r_parent.parent_id;
    end loop;
    end;
    /

    I tried to change the code of this a few different ways, but running into errors. The main problem seems to be that the collections don't refer to an element, in order to make this join (where parent_id = r_parent.parent_id).

    How you would replace the slider - for loops here (using 10 gr 2)?
    Thank you

    To replace the sliders, you will need to fill a table with the same data. Then process these tables

    create or replace procedure p_copy_record (p_gp_id in grandparent_table.gp_id%type)
    is
    type gp_array is table of grandparent_table % roytype;
    type p_array is the table of the parent_table % rowtype;

    l_gp gp_array;
    l_p p_array;

    v_gp_id grandparent_table.gp_id%type;
    v_parent_id parent_table.p_id%type;
    Start
    -get the next gp id
    Select grandparent_seq.nextval
    in v_gp_id
    Double;
    -bulk collect the current record of the gp - you don't really need but for pleasure it's im
    Select * bulk collect into l_gp from grandparent_table where gp_id = p_gp_id;
    -creation of a grandparent registration
    insert into grandparent_table
    values v_gp_id,
    .name l_gp (1),
    .other_columns_here l_gp (1);

    -Now bulk collect the parent records
    Select * bulk collect into l_p Parent_table where gp_id = l_gp (1) .gp_id;

    FOR i IN 1.NVL(l_p.COUNT,0) LOOP
    -get the next parent id
    Select parent_seq.nextval in the double v_parent_id;
    -create the parent record
    insert into parent_table)
    P_ID,
    gp_id,
    other_columns_again)
    v_parent_id,
    v_gp_id,
    LP (i) .other_columns_again;

    -While we are here create the records for this parent child
    insert into child_table)
    C_ID,
    P_ID,
    other_columns3)
    Select child_seq.nextval,
    v_parent_id,
    other_columns3
    of child_table c,.
    where parent_id = lp (i) .parent_id;
    END LOOP;
    END;

    To be honest, I'm not sure that you will really see a great improvement since you already limit the scope until the recording of one of the grandparents. Let's say the grandparent has 10 children each with 10 children who is just 111 records. As long as your tables are indexed by the node Id it should be fast just like that.

  • Question in cooperation with af:iterator and by program (add and delete records using the list)

    In our application, we try to add and delete records within a one: iterator lie to the backing bean list table.

    According to the feature remove should not fire any validation form so we are settign Remove button including the immediate property. And add can throw validation before adding a new record.

    Here the problem comes with button Delete with activated immeidate.  The deletions list action recording is removed from the collection list at the beacking bean, but after that the interface iterator partial page refresh user displays with bad Recordset. Some how instead of getting the last recordings of server of the user interface displays the previous local values for input components.

    For example: if I have 5 files in the list and delete record 2nd of collection. Backing bean (server side) the 2nd record is perfectly removal of list collection.

    On the user interface, the iterator 4 records are displayed as the size of the list is 4, but instead of 2nd record the last record is not rendered. According to my understanding, as deleting comme la suppression touche key is set immediately then the some how these recordings (genereted the Id of component runtime inside the i1: 0:it1 etc...) Apply request vandekerckhove is not updated gettign, Hene showing the old local values inplace of these components of entry and this behavior is only for input components.

    Can you suggest me a solution more come to the question above. Delete with immediate should unregister correspondent and only the record deleted if pannals UI.

    JSFF code

    <af:panelGroupLayout id="pgl1" binding="#{viewScope.formBB.mainPGL}">
            <af:iterator id="i1" value="#{viewScope.formBB.allEmployees}"
                         var="emp" rows="0" varStatus="vs"
                         binding="#{viewScope.formBB.iteratorBinding}">
              <af:panelFormLayout id="pfl1" maxColumns="4" rows="1" labelAlignment="top">
                <!--<af:outputText value="#{vs.index}" id="ot1"/>-->
                <af:inputText label="First Name" id="it1" value="#{emp.firstName}"
                              autoSubmit="true" required="true"/>
                <af:inputText label="Last Name" id="inputText1"
                              value="#{emp.lastName}" autoSubmit="true"
                              required="true"/>
                <af:commandImageLink text="Delete" id="cil1"
                                     immediate="true"
                                     actionListener="#{viewScope.formBB.deleteEmployee}">
                  <f:attribute name="index" value="#{vs.index}"/>
                </af:commandImageLink>
              </af:panelFormLayout>
            </af:iterator>
            <af:commandButton text="Add New Employee" id="cb1"
                              actionListener="#{viewScope.formBB.addNewEmployee}"/>
            <af:spacer width="10" height="10" id="s1"/>
    </af:panelGroupLayout>
    

    Delete the Action listener for the bean

    private List <Employee> allEmployees;
    public List getAllEmployees() {
            return allEmployees;
        }
        
    public void deleteEmployee(ActionEvent actionEvent) {
            int index = (Integer) actionEvent.getComponent().getAttributes().get("index");
            if(allEmployees != null && allEmployees.get(index) != null) {
                System.out.println("Emploeye Name:" + allEmployees.get(index).getFirstName());
                allEmployees.remove(index);
            }
            //AdfFacesContext.getCurrentInstance().addPartialTarget(mainPGL);
            AdfFacesContext.getCurrentInstance().addPartialTarget(iteratorBinding);
                
        }
    public void addNewEmployee(ActionEvent actionEvent) {       
            Employee addE = new Employee();
            if(allEmployees != null) {
                allEmployees.add(addE);
            }
            else {
                allEmployees = new ArrayList <Employee>();
                allEmployees.add(addE);
            }
            AdfFacesContext.getCurrentInstance().addPartialTarget(mainPGL);     
        }
    

    Jdev version - Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493

    POC Application - https://drive.google.com/file/d/0BysBrGAsXoo0Qjh3VGkzZkRGck0/view?usp=downalod

    Help, please.

    You probably need to reset submitted values.

    For this, you can use this util class: ResetUtils (reference Java APIs for Oracle ADF Faces)

    For example: ResetUtils.reset (iteratorBinding);

    BTW, you should never bind components to bean managed with a scope greater than the scope of the request.

    Dario

Maybe you are looking for