Add values in a table column

Hi guys,.
JDeveloper 11g Release 1.

I have a table with lots of columns where one column is 'quantity' (of type OutputText). The table is filled by the user. It is NOT related to any view object. What I'm trying to do, is add the amounts in the table and display them outside of the table in an inputText field.
It is perhaps a fundamental question, but since I'm a beginner I'm not able to do.
Help, please!


< af:table var = "row" rowBandingInterval = "0" id = "li_tab" binding = "#{pageFlowScope.Form9Bean.lineItem.tabLineItem} '"
emptyText = "#{pageFlowScope.Form9Bean.lineItem.tabLineItem.rowCount == 0?" "}" Click the Add button to create a line item. ': 'Access Denied. »} »
rowSelection = "single" displayRow = "selected" styleClass = "AFStretchWidth" columnStretching = "column: c18 ' filterVisible = 'true' summary = 'table in the topic.
inlineStyle = ' height: 200px; ">
< af:column headerText = "#{ebundle.» LINEITEM_QUANTITY_LABEL ID}"="li_c_quantity"blockable ="true"sortable ="true">
< af:outputText value = "#{row.quantity}" id = "li_ot_quantity" / > "
< / af:column >
.....

1 bind the 'Quantity' attribute to the bean.
2. here is how you can calculate:

int x = Integer.parseInt (quantity.getValue () m:System.NET.SocketAddress.ToString ());
int y = Integer.parseInt (totalQuantity.getValue () m:System.NET.SocketAddress.ToString ());
totalQuantity.setValue(x+y);

Quantity and totalQuantity this is RichInputText related to the two attribute object

Amit

Tags: Java

Similar Questions

  • How to continue to add values into a table...

    For this picture I have a set of 5 values but I want to be able to add more to what the user of the program found that they have registration enough it is to say, they enter 20 values without a last replacement itself. The code I have right now allows me to add a 6th but not up to the amount, I find it necessary.

    Here is the code:

    Add a mouse listener to respond to the addition of brands
    enter_btn.addEventListener (MouseEvent.CLICK, onClick);
    function onClick(event:MouseEvent):void {}

    Declare required variables
    var brands: Array = ["100" '76', '80', '54', '23'];
    var brand: Number;
    markIn var: String;

    Retrieve data from TextField
    markIn = markIn_txt.text;
    brand = Number (markIn);

    Table
    Marks.push (markIn_txt. (Text);
    trace (Marks);
    }

    Any help would be appreciated

    Push the table method is what allows you to add items in a table, without taboo.  Your problem is to declare the array inside the function.  By doing this you're recreating each time.   Try...

    var brands: Array = ["100" '76', '80', '54', '23'];

    enter_btn.addEventListener (MouseEvent.CLICK, onClick);

    function onClick(event:MouseEvent):void {}

    Declare required variables
    var brand: Number;
    markIn var: String;

    Retrieve data from TextField
    markIn = markIn_txt.text;
    brand = Number (markIn);

    Table
    Marks.push (markIn_txt. (Text);
    trace (Marks);
    }

  • Title of the report based on the value of the Table column

    Hello

    We use OBIEE 10 g.

    We have a Table and a chart based on the table in a report.

    Assume that the table has two columns, ID and NAME

    can we refer dynamically the value of the column NAME in the title of the report?
    for example
    the table has

    ID | NAME
    -------------
    123 | GS

    now, we would like the title to appear as

    Report for the GS

    where GS is dynamic

    Use the narrative mode and refer to the column that you want to display using @2 and place it instead of view title.

    Thank you
    Isabelle Renon

    Published by: Rajesh Raoul - BI on May 2, 2013 05:59

  • Permanently add values in a table then VI run

    I currently have a situtaion where I get a number of numerical values on a single line I need to store in a table. This has to be done during the execution of the program. I know that I can use the 'Build table function' but the word really sure I'd need some time loop with shift registers or a feedback node. Any suggestions on what would be the best way to implement this?

    After some people on this forum have done test (because they had the same question),

    The shift register is about 4 times faster than that of the feedback node.
    But in terms of functionality, they are identical.

  • Edit/view (data or Table column) value - cannot change the data, but it can be updated

    Hello

    According to the help of Oracle SQL Developer Center, the dialog ' Change/see value (data or Table column)' should "change the value of data" if we "are allowed to change the data." We strive to use this dialog box to modify/update data without having to write an Update statement, but is not to leave us. Us are not allowed to update the data, we can update via update statements. Even as the owner of the schema.table, it don't will change us the value in the dialog box "Edit/see value (data or Table column).

    Any ideas?

    We are on SQL Developer Version 3.0.0.4 build HAND - 04.34 and Oracle 11 GR 1 material (11.1.0.7) database.

    Thank you

    Alex Larzabal.

    You can still vote on the existing demand for this developer SQL to add Exchange of weight for implementation as soon as possible:
    https://Apex.Oracle.com/pls/Apex/f?p=43135:7:3974986722753169:no:RP, 7:P7_ID:4902

    Kind regards
    K.

  • Try to get the input parameter of a web service Yanick based on the value of the table

    Hello-

    I am new to ADF and Jdev 11 g (I'm a developer of forms). I had created a web service from a db stored pl/sql package. I can run a function with a parameter of the ADF faces.

    Instead of the input being entrable user parameter, I want to be based on a selected value of ADF table column. How to correlate the value of the selected row in the column as an input function parameter?

    I played with an ADF output text based on the table column ADF PartialTriggers the value set for the ADF... table that updates the output text based on the selected column. Can I use some kind of partial trigger on the input parameter?

    From a point of view of forms, I am looking for ownership of "Copy Item value" :)

    Two options:
    Declarative in tab link, as shown here:
    http://blogs.Oracle.com/Shay/2009/07/java_class_data_control_and_ad.html
    (its a method POJO but should be the same for a Web Service invoke).

    Or via code in your backing bean:
    http://blogs.Oracle.com/Shay/2009/06/setting_parameter_value_for_bi.html

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • Value separated by commas in a table column to get each field separtely?

    Hello

    I have the table that a column has values separated by commas in it. This table is populated using SQL LOADER, which is staging table.

    I need to retrieve the records of these values separated by commas.

    format of. CSV file is as -

    A separate file of pipes.

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2|

    DHCP-1-1-2. WNLB-CMTS-03-3,WNLB-CMTS-04-4,WNLB-CMTS-05-5|

    DHCP-1-1-3. WNLB-CMTS-01-1.

    DHCP-1-1-4. WNLB-CMTS-05-8,WNLB-CMTS-05-6,WNLB-CMTS-05-0,WNLB-CMTS-03-3|

    DHCP-1-1-5 | WNLB-CMTS-02-2,WNLB-CMTS-04-4,WNLB-CMTS-05-7|

    CREATE TABLE link_data (dhcp_token VARCHAR2 (30), cmts_to_add VARCHAR2 (200), cmts_to_remove VARCHAR2 (200));

    insert into link_data values ('dhcp-1-1-1','wnlb-cmts-01-1,wnlb-cmts-02-2',null);

    insert into link_data values ('dhcp-1-1-2','wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5',null);

    insert into link_data values ('dhcp-1-1-3','wnlb-cmts-01-1',null);

    insert into link_data values ('dhcp-1-1-4','wnlb-cmts-05-8,wnlb-cmts-05-6,wnlb-cmts-05-0,wnlb-cmts-03-3',null);

    insert into link_data values ('dhcp-1-1-5','wnlb-cmts-02-2,wnlb-cmts-04-4,wnlb-cmts-05-7',null);

    Here the cmts_to_add column has comma separted

    I need values such as -.

    > for wnlb-cmts-01-1,wnlb-cmts-02-2 > > wnlb-CMTS-01-1

    > > wnlb-CMTS-02-2

    > for wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5 > > wnlb-CMTS-03-3

    > > wnlb-CMTS-04-4

    > > wnlb-CMTS-05-5

    And so on...

    I do this because it's the staging table and I load data into the main tables using this table.

    This second field contain different values as the simple comma-delimited string.

    I need to write a PLSQL block to insert into the main table after checking as if dhcp-1-1-1 and wnlb-CMTS-01-1 is present in the main table so not to introduce other insert a new record.

    To meet this requirement, I need to get the distinct value of the cmts_to_add column to insert into DB.

    the value will be inserted as dhcp-1-1-1_TO_wnlb-cmts-01-1 and dhcp-1-1-1_TO_wnlb-cmts-02-2 for the first row of the array of link_data.

    The process will also be same for the rest of the lines.

    I use the function substrt and instr for this problem, but its does not work.

    declare

    cursor c_link is select * from link_data.

    l_rec_link link_data % rowtype;

    l_dhcp varchar2 (30);

    l_cmts varchar2 (20000);

    l_cmts_1 varchar2 (32000);

    Start

    Open c_link;

    loop

    extract the c_link in l_rec_link;

    l_cmts: = l_rec_link.cmts_to_add;

    loop

    l_cmts_1: = substr (l_cmts, 1, instr(l_cmts,',')-1);

    dbms_output.put_line (l_cmts_1);

    end loop;

    dbms_output.put_line(l_dhcp||) e '|| l_cmts);

    When the output c_link % notfound;

    end loop;

    exception

    while others then

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    end;

    Its a peusdo code I write, but it also gives me the wrong answer it gives me error ORA-20000: ORU-10027: buffer overflow, limit of 20000 bytes

    I am using-

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Please tell me if my problem isn't clear!

    Hello

    little 'trick': Add a comma at the end of the chain... So it's easier to deal with the fact that there are zero, one, or N components...

    CREATE TABLE link_data (dhcp_token VARCHAR2 (30), cmts_to_add VARCHAR2 (200), cmts_to_remove VARCHAR2 (200));
    insert into link_data values ('dhcp-1-1-1','wnlb-cmts-01-1,wnlb-cmts-02-2',null);
    insert into link_data values ('dhcp-1-1-2','wnlb-cmts-03-3,wnlb-cmts-04-4,wnlb-cmts-05-5',null);
    insert into link_data values ('dhcp-1-1-3','wnlb-cmts-01-1',null);
    insert into link_data values ('dhcp-1-1-4','wnlb-cmts-05-8,wnlb-cmts-05-6,wnlb-cmts-05-0,wnlb-cmts-03-3',null);
    insert into link_data values ('dhcp-1-1-5','wnlb-cmts-02-2,wnlb-cmts-04-4,wnlb-cmts-05-7',null);
    COMMIT;

    SET SERVEROUT ON
    DECLARE
    l_cmts VARCHAR2 (200 CHAR);
    l_cmts_1 VARCHAR2 (200 CHAR);
    BEGIN
    FOR r IN (SELECT dhcp_token, cmts_to_add |) ',' cmts
    OF link_data
    )
    LOOP
    l_cmts: = r.cmts;
    l_cmts_1: = SUBSTR (l_cmts, 1, INSTR (l_cmts, ",") - 1);
    While l_cmts_1 IS NOT NULL
    LOOP
    DBMS_OUTPUT. Put_line (r.dhcp_token |) '|' || l_cmts_1);
    l_cmts: = SUBSTR (l_cmts, INSTR (l_cmts, ",") + 1);
    l_cmts_1: = SUBSTR (l_cmts, 1, INSTR (l_cmts, ",") - 1);
    END LOOP;
    END LOOP;
    END;
    /
    DHCP-1-1-1. WNLB-CMTS-01-1
    DHCP-1-1-1. WNLB-CMTS-02-2
    DHCP-1-1-2. WNLB-CMTS-03-3
    DHCP-1-1-2. WNLB-CMTS-04-4
    DHCP-1-1-2. WNLB-CMTS-05-5
    DHCP-1-1-3. WNLB-CMTS-01-1
    DHCP-1-1-4. WNLB-CMTS-05-8
    DHCP-1-1-4. WNLB-CMTS-05-6
    DHCP-1-1-4. WNLB-CMTS-05-0
    DHCP-1-1-4. WNLB-CMTS-03-3
    DHCP-1-1-5 | WNLB-CMTS-02-2
    DHCP-1-1-5 | WNLB-CMTS-04-4
    DHCP-1-1-5 | WNLB-CMTS-05-7

    Best regards

    Bruno Vroman.

  • ADF-how to read the value of the ADF Table column.

    Hello

    I created a table of the adf by reading the variable (CSV) file, separated by commas.
    N ° of the table columns is variable.
    The last column of the table has the input text box so that the user can enter the values in the user interface.
    I want to read these values provided by the user in my grain of support.

    Any help or pointers will be great.

    Thank you
    Lecornu

    Hello

    Have you tried to analyze the application after you have submitted the form? Just add the following code to your action method.

    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.Iterator;
    
    import javax.faces.FacesException;
    import javax.servlet.http.HttpServletRequest;
    
    ...
    
    FacesContext context = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
    Map requestParameters = request.getParameterMap();
    
    Iterator iter = requestParameters.entrySet().iterator();
    while(iter.hasNext()) {
      Entry entry = (Entry) iter.next();
      String key = (String)entry.getKey();
      String value = ((String[])entry.getValue())[0];
    
      if(key.contains(":cellInput")) {
        String yourInputTextValue = value;
        // Do something with yourInputTextValue
      }
    }
    

    Concerning

    Majo

    Edited by: DerMajo the 09.11.2009 13:05

  • Under certain conditions add value in table

    Hi all

    I have two tables 2D of the string data in my VI (taken from the .mdb using ADO & SQL file). The "Window list" table on the left, that's what I want to add values to. The 'List of glass' table on the right contains the values that I want to add to the main table according to the values in other cells.

    For example:

    1 component ID window are 2191 and 2001. Under the thickness of the component 1/component 2 in the table "window list", I would add the thickness appropriate for stream ID 2191 and 2001 table "list of glass".

    Here's a snip of the two tables in question.

    This should be simple enough, but as I am a rookie LV I am not very well how to do.

    Thank you very much

    Laura

    Joint must be what you want.  Let me know if you have any other questions.

  • How to replace the value of a column in a table based on the value in the second column?

    Hi, I would like to find in a table 2D for values that meet certain criteria (for example, a column< 0.98).=""  based="" on="" which="" rows="" meet="" this="" criteria,="" i="" want="" to="" replace="" the="" values="" in="" a="" different="" column="" of="" the="" array="" (change="" to="" 'nan'="" so="" that="" the="" values="" will="" not="" be="" included="" in="" any="" calculations="" on="" that="" column,="" for="" example="" the="" finding="" the="" mean).=""  i've="" attached="" a="" sample="" .csv="" file.=""  if="" the="" values="" in="" column="" 3="" (index="" 2)="" are="" less="" than="" 0.980="" (or="" some="" other="" user="" defined="" value),="" then="" the="" value="" in="" column="" 2="" (index="" 1)="" should="" be="" replaced="" with="" nan.=""  can="" someone="" help="" out="" with="" this="" search="" and="" replace="">

    Thank you

    Keith

    (using LV 2009 SP1)

    A few quick hits.

    You can merge the two for loops

    You have not need one of the constants 1 and 2 in the index table.  They will solve automatically when you expand on the index picture, once you have wired to 0 in the column index.

    It seems a lot of handling additional table spent unnecessarily.

    See below.  I did not try to duplicate your code to see how it actually works, but I believe that I have attached will give the same result with less steps.

  • Add values for them to table without accidental

    Hi I am writing a program for research at penn state behrend. It is designed to take a pressure transducer values and calculate pressure losses. My teacher wants to gather incriments of 10, their average values and then store all means when the user chooses you to start saving. I use a loop for to bring values and the average of the 10 output collected values in a table. After 10 averages are collected the program to output these values in a table. I can't understand how to continue to add to this table without overwriting the previous values. Any help would be appreciated. I'm uploading what I have so far. Thank you

    PS I use a generator of random numbers for testing only

    ajh305

    Keywords:

    Build the Array function

    shift registers

  • ORA-02374: error loading conversion table / ORA-12899: value too large for column

    Hi all.

    Yesterday I got a dump of a database that I don't have access and Production is not under my administration. This release was delivered to me because it was necessary to update a database of development with some new records of the Production tables.

    The Production database has NLS_CHARACTERSET = WE8ISO8859P1 and development database a NLS_CHARACTERSET = AL32UTF8 and it must be in that CHARACTER set because of the Application requirements.

    During the import of this discharge, two tables you have a problem with ORA-02374 and ORA-12899. The results were that six records failed because of this conversion problem. I list the errors below in this thread.

    Read the note ID 1922020.1 (import and insert with ORA-12899 questions: value too large for column) I could see that Oracle gives an alternative and a workaround that is to create a file .sql with content metadata and then modifying the columns that you have the problem with the TANK, instead of BYTE value. So, as a result of the document, I done the workaround and generated a discharge .sql file. Read the contents of the file after completing the import that I saw that the columns were already in the CHAR value.

    Does anyone have an alternative workaround for these cases? Because I can't change the CHARACTER set of the database the database of development and Production, and is not a good idea to keep these missing documents.

    Errors received import the dump: (the two columns listed below are VARCHAR2 (4000))

    ORA-02374: error loading «PPM» conversion table "" KNTA_SAVED_SEARCH_FILTERS ".

    ORA-12899: value too large for column FILTER_HIDDEN_VALUE (real: 3929, maximum: 4000)

    "ORA-02372: row data: FILTER_HIDDEN_VALUE: 5.93.44667. (NET. (UNO) - NET BI. UNO - Ambiente tests '

    . . imported "PPM". "' KNTA_SAVED_SEARCH_FILTERS ' 5,492 MB 42221 42225-offline

    ORA-02374: error loading «PPM» conversion table "" KDSH_DATA_SOURCES_NLS ".

    ORA-12899: value too large for column BASE_FROM_CLAUSE (real: 3988, maximum: 4000)

    ORA-02372: row data: BASE_FROM_CLAUSE: 0 X '46524F4D20706D5F70726F6A6563747320700A494E4E455220 '.

    . . imported "PPM". "' KDSH_DATA_SOURCES_NLS ' lines 229 of the 230 308.4 KB

    Thank you very much

    Bruno Palma

    Even with the semantics of TANK, the bytes for a column VARCHAR2 max length is 4000 (pre 12 c)

    OLA Yehia makes reference to the support doc that explains your options - but essentially, in this case with a VARCHAR2 (4000), you need either to lose data or change your data type of VARCHAR2 (4000) to CLOB.

    Suggest you read the note.

  • update of several columns of values in another table

    Hello

    I have two tables in a database of 11 GR 2 that contain similar data. There is no FK relationship between the two tables, and for now, I need the data in MASTER to match what is in the SECONDARY. Table data types are the same with the same length.

    Table 1 is called MASTER and columns are:
    MTID
    ADDRESS1
    ADDRESS2
    CITY

    Table 2 is called SECONDARY and columns are:
    SDID
    ADDRESS1
    ADDRESS2
    CITY

    MID and SID are the same on both, but the rest of the columns may be the same or in some cases are different.

    I ran the following query that lets me know there are 20 k odd rows that have different data in these lines (I'm not at work at the mo so do not have the exact query I ran or table column names, but it's close enough).
    select
    m.address1 as maddress1,
    s.address1 as saddress1,
    m.address2 as maddress2,
    s.address2 as saddress2,
    m.city as mcity,
    s.city as scity
    from master m, secondary s
    where m.mtid = s.sdid
    and m.address1 != s.address1
    or m.address2 != s.address2
    or m.city != s.city
    /
    I need to update the rows in the master of secondary school where these values are different. I tried a few different queries updated with no luck.

    I want to do something like
    update m.address1
    set m.address1=s.address1
    where m.address1 != s.address1
    and m.mtid = s.stid;
    But I want to update columns address1 and address2, city of master.

    Any ideas on how I can do this? After you run the update results of my select query should return no rows.

    Thanks in advance and I hope that the question made sense.

    1008991 wrote:
    I got a similar error as well:

    update master m
    set (sm_user_addr_1, sm_user_addr_2, sm_user_city, sm_user_postal_cde)
    = (select sm_user_addr_1, sm_user_addr_2, sm_user_city, sm_user_postal_cde
    from secondary s
    where s.sd_key = m.sm_key
    )
    where exists (
    select 1 from secondary s
    where s.sd_key = m.sm_key
    and (s.sm_user_addr_1     != m.sm_user_addr_1 or
    s.sm_user_addr_2     != m.sm_user_addr_2 or
    s.sm_user_city       != m.sm_user_city   or
              s.sm_user_postal_cde != m.sm_user_postal_cde));
    
    ERROR at line 3:
    ORA-01427: single-row subquery returns more than one row
    

    It simply means that you have several lines with the same sd_key for a given sm_key.
    Is that you have secondaries for one master. You must choose only one line
    If you need additional terms in your where clause

    select sm_user_addr_1, sm_user_addr_2, sm_user_city, sm_user_postal_cde
               from secondary s
             where s.sd_key = m.sm_key
    
  • How to upgrade a table column using the values in the Oracle collection

    create or replace procedure test_coll
    
    IS
    
    CURSOR upd 
    IS
    SELECT CONTACT_NAME FROM Supplier_16;
    
    TYPE dept IS TABLE OF upd%rowtype;
    cur_var dept;
    
    Type List Is table Of  varchar2(20);
    Name List:=  List('Shilpi','Sunil','Shreyas','Saral');
    
    BEGIN
    
    OPEN upd;
    LOOP
         FETCH upd BULK COLLECT INTO cur_var;
    --    EXIT WHEN upd%NOTFOUND;
    
         FORALL i IN cur_var.FIRST..cur_var.LAST
      
         UPDATE supplier_16
    **  SET Contact_name= name(i);  ***
         
         COMMIT;
    
    END LOOP;
    CLOSE upd;
    
    END;
    On the "BOLD" line, I don't know how I should move the values of the collection of name I said without which are set all the values in the table supplier_16 = 'Saral.

    Help, please.

    Aashish S. wrote:
    Thank you very much...

    Yes, I slide collections and was trying to reach somwthing on similar lines to which you provided the code example...

    My essay is equipped to take a collection: initialized with values of say 3-4...

    Take other tables... A column... and update the column in the table (not PK, FK anything) using the values of the initialized collection...

    However, I am stuck between the two on how the UPDATE clause should be...

    OK, if it's just because you want to practice with collections, you might do something like this...

    SQL> set serverout on
    SQL> create table supplier_16 as
      2  select 'Frederick' as contact_name from dual union all
      3  select 'Robert' from dual union all
      4  select 'Jeremy' from dual union all
      5  select 'Simon' from dual
      6  /
    
    Table created.
    
    SQL> create or replace procedure test_coll is
      2    CURSOR upd IS
      3      SELECT CONTACT_NAME
      4      FROM Supplier_16
      5      FOR UPDATE;
      6    Type List Is table Of  varchar2(20);
      7    Name List := List('Shilpi','Sunil','Shreyas','Saral');
      8    v_contact_name varchar2(30);
      9    v_idx          number := 1;
     10  BEGIN
     11    OPEN upd;
     12    LOOP
     13       FETCH upd INTO v_contact_name;
     14       EXIT WHEN upd%NOTFOUND;
     15       UPDATE supplier_16
     16       SET    contact_name = name(v_idx)
     17       WHERE CURRENT OF upd;
     18       DBMS_OUTPUT.PUT_LINE(v_contact_name||' update to '||name(v_idx));
     19       v_idx := v_idx + 1;
     20    END LOOP;
     21    CLOSE upd;
     22    COMMIT;
     23  END;
     24  /
    
    Procedure created.
    
    SQL> exec test_coll;
    Frederick update to Shilpi
    Robert update to Sunil
    Jeremy update to Shreyas
    Simon update to Saral
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from supplier_16;
    
    CONTACT_N
    ---------
    Shilpi
    Sunil
    Shreyas
    Saral
    

    Of course, there is treatment rank by rank and is not best for performance, but it allows you to access your collection that you created names.

Maybe you are looking for

  • Problem installing XP on Qosmio G50 with vista preinstalled

    Hello everyone, just joined, and after a few navigation that I think will like this place. I just purchased a Qosmio G50 10 with preinstalled Vista and I want to install XP on the second hard drive to have the double-boot. It starts good but after it

  • HP Pavilion 15-e039tx: upgrade RAM to HP Pavilion 15-e039tx

    Hello I want to update my laptop 4 GB RAM and want to know the best RAM for my laptop. I was looking online and found these 2: http://www.Amazon.in/GP/product/B00CQ35GYE/ref=s9_simh_gw_p147_d0_i2?pf_rd_m=A1VBAL9TL5WCBF&pf_rd_s=... http://www.Amazon.i

  • Windows Security Center service cannot be started error

    Original title: sercurity Centre cannot be started plss fix it sadvfg

  • User - default connection profile service

    I read with great interest the issues that others were unable to connect to their account administrator - get a connection failed message.  I'm having the same problem now. Yesterday the computer was working fine and today when I tried to connect I a

  • BlackBerry 10 no data on the 10.1 update

    Hi guys,. I updated my BlackBerry Z10 to 10.1.0.273 via WiFi and since then I was able to access the data when I am not connected to WiFi. The indicator of the mobile Force appears as tiny and BlackBerry signal never appears. This is - due to a bad i