How to simultaneously update multi field (chart wpf)

How to use several piece add simultaneously data?

For example, there are 18 parcels of graph. The Datasouce of the graph is ChartCollectiongraphds [18]

It should run 18 times to APPEND to update the whole graph.

Code:

APS [0-17] = graphds [0-17] .append

Dispatcher.BeginInvoke (aps, simulatedData) / / run 18 times

I hope that there is similar data

graphds. Append (datasources Point [18])

who can cool 18 draw data simultaneously.

complete code to testmultiplot.zip

Thank you

The types of specific elements involved aren't important. The idea of the AppendAll helper function is just to have a single method to perform all work to append, rather than citing for each separate addition. You can also set the programme of assistance generically and use any type of data for the items:

private static void AppendAll( ChartCollection[] charts, IList[] values ) {

        for( int i = 0; i < charts.length;="" ++i="" )="">

            charts[i].Append( values[i] );

        }

    }

Tags: NI Software

Similar Questions

  • How can I update a XY chart without erasing the previous data?

    Hello

    I'm doing two XY plots in a chart, but the data are not generated at the same time, how can I add a new path in the same XY graph without losing the earlier.

    I enclose my code to show you my problem...

    See attached file that can demonstrate.

    When your parcels have the same number of points then by default values (0) will be added to the plot which is having less number of points. you could write code that adds NaN values to the shorter table.

    Second, I strongly recommend to read some good coding practice, especially on the machinery of the State in line to wait. they can make your life much easier. current coding style you encounter is required to give you a few problems in the future.

  • How can I update the field when the enabled checkbox

    Hi all

    I am using oracle 10 g forms,

    I have a block with 20 areas. So first 10 fields are not editable and remaining are editable. If the user enters data and modifies the data. And check the box and save the data.

    Inside save button I wrote the code update.

    When the user change records of two or three and three check box and click on save button only a recording is done in my custom table.

    It's my code please correct me where I went worng.

    It's my code inside my button

    declare
    Begin
    If: ASSEMBLIES_BLOCK. CHECK_IN_OUT = 'Y' THEN
    IF SHOW_ALERT ("UPDATE_ALERT") = alert_button1 THEN
    LOOP
    XXTLX_PO_LOGOSTICS. XXTLX_PO_LOGOSTICS_UPDATE;
    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
    NEXT_RECORD;
    END LOOP;
    STANDARD.COMMIT;
    fnd_message.set_string ("Transaction saved successfully");
    fnd_message. Show;
    On the other
    NULL;
    END If;
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHILE OTHERS
    THEN
    NULL;
    END;


    I write a procedure in the program unit.

    XXTLX_PO_LOGOSTICS. XXTLX_PO_LOGOSTICS_UPDATE

    Is my block of current assemblies that the user enter data and click the save data check box.

    Update XXTLX_PO_ASSEMBLIES set CASE_NO = nvl(:assemblies_block.) CASE_NO, Null),
    PACKAGE_TYPE = nvl(:assemblies_block.) PACKAGE_TYPE, null),
    PACKAGE_QTY = nvl(:assemblies_block.) PACKAGE_QTY, Null),
    GROSS_WT = nvl(:assemblies_block.) GROSS_WEIGHT, Null),
    OPI_DATE = nvl(:assemblies_block.) OPI_DATE, Null)
    Where ponum =: DETAIL_BLOCK. PO_NUMBER
    AND PO_LINE_NUM =: DETAIL_BLOCK. LINE_NUM
    AND BOM_NO =: assemblies_block. BOM_NO;




    So when we click on the multiple check box and save the data that one is striking.

    Thanks and greetings
    Srikkanth

    I guess that I do not understand.

    >
    ... my requirement is that active fields must get updates. If there is way to 10 records in a block, sick day only registration of the 3rd and 4th and then click on the box... and then ill click on save button.
    >

    Is - this block a block of data or a block of data non-base? If it is a block of data, Oracle can manage updates of this block for you because if keep tabs if a record has been updated or not and you wouldn't need to do an UPDATE statement.

    If it is a non-base of data block and you are a loop in each folder and only update items that have checkboxes next to them you would still go to the first record, and then scroll through each record and see if it needs to be updated. I guess right here because I don't think I have a good knowledge on what you're doing, but you can change your XXTLX_PO_LOGOSTICS. Package XXTLX_PO_LOGISTICS_UPDATE update only elements that have checkboxes next to them, by checking every box:

    -- Check Case No
    if nvl(:assemblies_block.chase_no_check,'N') = 'Y' then
      update xxtlx_po_assemblies
         set case_no = :assemblies_block.case_no
       where ponum = :detail_block.po_number
         and po_line_num = :detail_block.line_num
         and bom_no = :assemblies_block.bom_no;
    end if;
    
    -- Check Package Type
    if nvl(:assemblies_block.package_type_check,'N') = 'Y' then
      update xxtlx_po_assemblies
         set package_type = :assemblies_block.package_type
       where ponum = :detail_block.po_number
         and po_line_num = :detail_block.line_num
         and bom_no = :assemblies_block.bom_no;
    end if;
    
    -- Check Package Qty
    .
    .
    .
    
  • How can I update form field with data using "on Blur.


    Perhaps also very easy for all the experts out there that you but I'm trying to update a form field with data in another field in the form when they come out the first form field.

    Basically creating a "billing" and a form "shipping" I want to be updated automatically.

    Any help would be extremely Grateful.

    Thank you

    Steve

    He does!

    shipFirstNameText.value = this.value

    It worked

  • How to make dynamic form fields updated?

    This is going to be an ugly post, just be careful! :)

    I have a form that retrieves his labels and text input field names dynamically from a database. Rather than having the form hardcoded, we are able to add new columns to a table and the form automatically adds the new labels and fields via CFQUERY.

    When the form is completed and submitted (post method), the database is supposed to be updated. However, because our names of input fields are populated through query, we can not write a query to update static when we add new elements of form.

    So, I have a solution to this (in my head), but I'm stuck in a bit of logic and can't get it in the code. I'm looking for a way to write FORM #. # fieldname # (here is where it gets ugly). Because the form sent by the post method, I find myself with a bunch of FORM.fieldname on my action page (and fieldname is generic for what are real variables).

    So here's how I am update:
    I have a table (let's call it table1) that contains a column of all the column names in the data table (table2). This table is used for query purposes only, no data is updated here of the form.
    I have a table1 request to call all the column names in table2.
    < cquery datasource = "exdb" name = "exname" >
    SELECT ColumnName
    FROM table1
    < / cfquery >
    Then I write the update query that will update the elements they are loop using CFOUTPUT:
    < CFOUTPUT QUERY = "exname" >
    < cfquery datasource = "exdb" name = "exupdate" >
    UPDATE table2
    SET #columnName # = #FORM. < columnName > #.
    WHERE itemID = #FORM.itemID #.

    It's my dilemma. As you can see, the cfoutput is a loop... So we will take the first element in the loop, call him 'name1 '. So our query update said SET name1 = #FORM.name1 #, and it will update the table with what was presented in the entry for name1 field. The cfoutput to loop again, this time it's of name2. SET name2 = #FORM.name2 #. Now, the form includes a hidden itemID to specify where the table should be updated, as you can see above. So, now that you see how it works, my problem is to get #FORM. < columnName > # FORM.name1, FORM.name2, etc.
    In Coldfusion, you would write #FORM.variable # to call a FORM element. However, given that the variable is not defined, and allows us to fill a request, we make SHAPE #. #variable # where #variable # must be resolved before #FORM. ___ #

    You are with me on this? This is very complex in the explanation, but if you need more information, I can provide more clearly. I would like to know what you think. Really, I have the solution, but to FORM #. # columnName # to solve is another problem. I think what I need is to understand the order of operations for this statement, so #columnName # resolves first.

    You'll want to use the scope structure notation when dealing with your form variables. The Form.SomeVar variable can also be written as ['SomeVar']. Using this syntax, you can do something like this:

    UPDATE table2
    SET #columnName # = #FORM [columnName] #.
    WHERE itemID = #FORM.itemID #.

    You can also look on the following to help optimize your code:
    (1) learn how to use - it could speed up your code a bit.
    (2) according to the DB that you use, you may be able to combine all of your UPDATE within 1 SQL commands block. This will allow to do all your actions with 1 DB connection database, instead of a bunch (works in MSSQL, Oracle or MySQL, not sure)

  • How update a field in a report whenever the page is refreshed?

    Hello

    I have a pain with the logic below field:

    If the Date deadline > SYSDATE and end Date = NULL then
    Suffering: = Date deadline - SYSDATE
    End

    How can I change a field suffering in a report whenever the page is refreshed?

    Thank you
    Guy

    Hello

    Try to add a column to your SELECT statement.
    CASE
    WHEN G IS NULL
    THEN
    NULL VALUE
    WHEN (F IS NULL) AND (G<>
    THEN
    SYSDATE - G
    WHEN (F IS NOT NULL AND F > G)
    THEN
    F G
    ON THE OTHER
    NULL VALUE
    FINISH as difference

    Kind regards
    Dimitri
    ----------------------------------
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    AWARDS: Don't forget to mark correct or helpful messages on the forum

  • How can I update the table table of contents for the sub condition?

    Hi guys,.

    I have a custom table that must be updated in a table source 'abc ';

    I have to update 8 fields of 'abc', based on five keys corresponding between custom and abc records

    Here is the syntax I have a suite please let me know the effective way to do this.

    I get the error message for the syntax below. I think that 'FROM' keyword must not be use GTA?

    update of custom table one

    Set a.field1 = b.field1, a.field2 = b.field2, a.field3 = b.field3

    ABC b

    where value = ' 05 "

    Hello

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the exact results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    If you ask yourself on a DML statement, such as UPDATE, then the CREATE TABLE and you post instructions INSERT must re - create the tables as they are to the DML, and the results will be the content of the or a modified tables when it's all over.

    Simplify the problem as much as possible.  For example, if your real problem involves 8 columns, try to post an issue affecting only 2 or 3 columns.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    2766124 wrote:

    Hi guys,.

    I have a custom table

    What is a custom table?  How is it different from a regular table?

    that must be updated in a table source 'abc ';

    I have to update 8 fields of 'abc', based on five keys corresponding between custom and abc records

    Here is the syntax I have a suite please let me know the effective way to do this.

    I get the error message for the syntax below. I think that 'FROM' keyword must not be use GTA?

    update of custom table one

    Set a.field1 = b.field1, a.field2 = b.field2, a.field3 = b.field3

    ABC b

    where value = ' 05 "

    An example of the correct syntax for the use of a subquery in an UPDATE statement is:

    UPDATE one

    SET (Field1, Field2, Field2) =

    (SELECT field1, Field2, field3

    ABC

    WHERE value = ' 05 "

    );

    This is a correct syntax, but I don't know if this will do exactly what you want, because I don't know exactly what you want.

    FUSION is often easier and sometimes more effective than updated.

  • How can I update the rubrics with WebServices?

    How can I update the rubrics with WebServices?

    /Anyone/ has some success with this?

    It becomes important to our business objectives in order to solve the problems within the control elements.

    I can't enter the number of line by line in order to uniquely identify it. How can I get that number, so I can send it with xml "update"?

    A little nudge in the right direction would be much appreciated.

    Aaron.

    You must use a field on the form as the one on the line items, NOT the line number that appears in the journal of the line item. If I understand correctly, the LineItemIdentifier can be any field on the form, even the short description. It is best if you know you will use web services to update the line items, you add a (potentially hidden) field to the form and fill that with unique values when positions are created. If you are working with existing elements of line, then you must choose a field that will be usually unique within a single record and hope, you don't have a lot of duplicates.

  • How can I update the data in mysql using the button defined in the table?

    Hello

    right now I am doing my project for the online election system using dreamweaver cc14. I create a table using php code to bind the data to mysql, and in this painting, I create also a button "vote" for voters to vote. My question is, how can I update my polling data in the mysql database when voters push button "vote" based on the id of the candidates? Here is my code I try:

    <form method="post" id="form1">
          <?php
    $servername = "localhost";
    $username = "root";
    $password = "pass";
    $dbname = "ses";
    
    
    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
         die("Connection failed: " . $conn->connect_error);
    } 
    
    
    $sql = "SELECT No, Calon, ID, Jurusan, Image FROM candidates";
    $result = $conn->query($sql);
    
    
    if ($result->num_rows > 0) {
         echo "<table >
      <tr>
      <th>NO</th>
      <th>Candidate</th>
      <th>INFO</th>
      <th>Vote</th>
      </tr>";
         // output data of each row
         while($row = $result->fetch_assoc()) {
             echo "<tr>
      <td>" . $row["No"]. "</td>
      <td><img src=" . $row['Image'] . "></td>
      <td><br/>-" . $row["Calon"]. " <br/>-" . $row["ID"]. " <br/>-" . $row["Jurusan"]. "<br/></td>
      <td><input type="."submit"." name=".$row["Calon"]." id=".$row["No"]. " value="."Vote"."></td>
    
      </tr>";
      if(isset($_POST["".$row['No'].""])){
    
      $vote_sachin = "UPDATE candidates SET Undi=Undi+1 WHERE No=".$row["No"]. "";
    
      $run_sachin = mysqli_query($conn, $vote_sachin);
    
    
    }
        }
      echo "</table>";
    } else {
         echo "0 results";
    }
    
    
    
    
    
    
    $conn->close();
    ?>
    
    
    
    
        </form>
    

    I hope someone can help me in this area, because I'm still new in this programming language.

    Thank you.

    Youre probably going to insert a 'radio button' next to the names of candidates and recover the database ID of that (I guess that the ID is the primary key in your database that uniquely identifies each record.

    His great confusion because you seem to update the database to aid WHERE no = "." $row ["no"]. so I don't know that ID is the primary key?

    IF "No" IS your master database key, you need to change the code below:

    TO:

    Here's the complete code based on the ID of your primary database key.

    <>

    $servername = "localhost";

    $username = 'root ';

    $password = "pass";

    $dbname = 'his ';

    Create the connection

    $conn = new mysqli ($dbname, $servername, $username, $password);

    Check the connection

    If {($conn-> connect_error)

    Die ("connection failed:".) $conn-> connect_error);

    }

    $sql = "SELECT No, Calon, ID, Jurusan, Image OF candidates";

    $result = $conn-> Query;

    If you click on the button "vote" form run the code to update the database below

    {if (isset($_POST['vote']))}

    Get the value of the ID of the radio button form field and store it in a table.

    $update_vote = $_POST ['candidate_id'];

    loop in the table and update the database

    foreach ($update_vote as $value) {}

    $vote_sachin = ' candidates UPDATE SET Undi = Undi + 1 WHERE ID = ".". " $value. » « ;"

    $run_sachin = mysqli_query ($conn, $vote_sachin);

    }

    }

    ?>

    <>

    If ($result-> num_rows > 0) {}

    ECHO '.

    ";

    each line output

    While ($row = {$result-> fetch_assoc())}

    ECHO '.

    ";

    }

    ECHO '.

    ";

    ECHO '.

    NO. Candidate INFO To the vote
    " . $row ["no"]. "
    -" . $row ["Calon"]. "
    -" . $row ['ID']. "
    -" . $row ["Jurusan"]. "
    ";

    } else {}

    echo "0 results."

    }

    $conn-> close();

    ?>

  • Change/update user field defined in a scheduled task

    I wrote a notification task to send an e-mail to a manager who has used contract with a contract that expires.

    Once we isolate a user with a contract about to expire, send us a notification to the Manager. The date on which the notification is sent must be stored in the USR in a field defined by the user, "USR_UDF_LASTSENT."

    Update this field USR_UDF_LASTSENT, this is where I'm having trouble.

    I tried to use the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single user called "currentUser" object I want to store a Date object in the field defined by the user "USR_UDF_LASTSENT". Date now = new Date();

    I tried: currentUser.setAttribute ("USR_UDF_LASTSENT", today); It will work without error, but when I check the DB there is no change to the attribute.

    With a defined instance of the UserManager userManager, I tried: userManager.modify ("USR_UDF_LASTSENT", today, currentUser); That errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM - 3054135:No user found for criteria 2 USR_UDF_LASTSENT-9/24/13:58 PM.:USR_UDF_LASTSENT:9/24/13 14:58. Looks like he did a search rather than a change.

    I also tried using the Manager of the entity in the following way:

    Date now = new Date();

    < String, Object > HashMap mapAttrs = new HashMap < String, Object > (); 

    mapAttrs.put ("USR_UDF_LASTSENT", today); 

    EntityManager entMgr = Platform.getService (EntityManager. class); 

    entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

    But he returns this error: failure: oracle.iam.platform.entitymgr.UnknownAttributeException: User: [USR_UDF_LASTSENT]

    Is my entityType, 'User' inappropriate in this case? What should be used here?

    How can I set or update this user defined field from a scheduled task?

    Thank you guys. I went to the system of identity and selected management console 'Export' below 'Management System' which, I think Kevin may have been referring to. I had a the AttributeDefinitions xml export for our user-defined fields. In this file, there is a header for the attribute I was looking for:

    ...

    ...

    usr_udf_lastsent

    ...

    I put the string 'LastSent' instead of USR_UDF_LASTSENT in the version EntityManager in my attempt at this task. I think that's what Kevin and delhi have come.

    It does not work:

    ...

    Date now = new Date();

    HashMap mapAttrs = new HashMap ();

    mapAttrs.put ("USR_UDF_LASTSENT", today);

    EntityManager entMgr = Platform.getService (EntityManager.class);

    entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

    ...

    But this fact:

    ...

    Date now = new Date();

    HashMap mapAttrs = new HashMap ();

    mapAttrs.put ("LastSent", today);

    EntityManager entMgr = Platform.getService (EntityManager.class);

    entMgr.modifyEntity ("user", currentUser.getEntityId (), mapAttrs);

    ...

    I wonder if currentUser.setAttribute ("LastSent", today); would work... Hmm.

  • How can I update Adobe Acrobat 8.0 Standard

    How can I update Adobe Acrobat 8.0 Standard after installing it on Windows 7? Ive tried a few files of AcrobatUpd8 * _all_incr.msp , but I get an error that the upgrade program is may be missing. I can't afford to upgrade to X * when it works for what I need for which is simply to break the high multi page documents created by Quickbooks.

    Certainly, he can't install the printer driver in Acrobat 8.0 in Windows 7 64 bit, it has not been written too. Apparently, however, 8.1 is able to install the printer driver.

    Unfortunately, Adobe took to the bottom of the page with the release notes. But you may need to use the * GFE * versions (English, French, German). See http://helpx.adobe.com/acrobat/kb/update-patch-acrobat-reader-7.html

    After 8.1 there is an update of "universal" (all languages).

  • Import Format script to update multiple fields

    Following my previous post yesterday (Import Format script required for work in several areas , now I need my script import to Update several fields (two) at the same time, based on criteria across multiple fields. ) So far, I can use DW. Utilities.fParseString to assess values across several fields, but now I need to update not only the field in question, but also an additional field at the same time. For example:

    Function TBService (strField, strRecord)

    "How to upgrade a second field at the same time?
    Dim strField2 As String

    If left (strField, 1) = "S" Then
    If DW. Utilities.fParseString (strRecord, 3, 8, ',') = 'B1110"Then
    strField2 = "N101.
    On the other
    strField2 = 'network n/a '.
    End If
    TBService = strField
    On the other
    TBService = "Service s/o".
    End If

    End Function

    Is it still possible? Should I look for to create an event script that would work subsequent to importation? Or is it possible here in the import script?

    The second field you are trying to manipulate should have its own import script.

  • Update several fields... need advice.

    Hi all

    I have a bit of a problem with the update of several fields in a table...

    Lets say we have two tables. Table one is called t_employe for example:
    create table t_employe (
    year number,
    line varchar2(1),
    counter number,
    value number)
    To set random data in the table:
    insert all
    into t_employe (year, line,counter, value)
    values(2011,'3','2946','3344')
    into t_employe (year, line,counter, value)
    values(2011,'3','2947','4433')
    into t_employe (year, line,counter, value)
    values(2011,'3','2948','4455')
    into t_employe (year, line,counter, value)
    values(2011,'3','2949','5544')
    select * from dual
    OK second table would be:
    create table to_update (
    year number,
    line varchar2(1),
    counter number,
    date_pos_1 date,
    value_pos_1 number,
    date_pos_2 date,
    value_pos_2 number,
    date_pos_3 date,
    value_pos_3 number,
    date_pos_4 date,
    value_pos_4 number,
    date_pos_5 date,
    value_pos_5 number)
    Data:
    insert all
    into to_update (year, line,counter, date_pos_1,value_pos_1,date_pos_2,value_pos_2,date_pos_3,value_pos_3,date_pos_4,value_pos_4,date_pos_5,value_pos_5)
    values(2011,'3','2946',sysdate,'5434',null,null,null,null,null,null,null,null)
    into to_update (year, line,counter, date_pos_1,value_pos_1,date_pos_2,value_pos_2,date_pos_3,value_pos_3,date_pos_4,value_pos_4,date_pos_5,value_pos_5)
    values(2011,'3','2947',sysdate,'11',sysdate,'123',null,null,null,null,null,null)
    into to_update (year, line,counter, date_pos_1,value_pos_1,date_pos_2,value_pos_2,date_pos_3,value_pos_3,date_pos_4,value_pos_4,date_pos_5,value_pos_5)
    values(2011,'3','2948',sysdate,'33',sysdate,'44',sysdate,'8908',null,null,null,null)
    into to_update (year, line,counter, date_pos_1,value_pos_1,date_pos_2,value_pos_2,date_pos_3,value_pos_3,date_pos_4,value_pos_4,date_pos_5,value_pos_5)
    values(2011,'3','2949',sysdate,'1',sysdate,'2',sysdate,'343',sysdate,'78',null,null)
    select * from dual
    OK, now what I want to do is to update the fields in the table to_update where value_pos is NULL. To explain this better imagine
    Collums are from left to right in the order value_pos_1, the value_pos_2, the value_pos_3... Now, I would check for each line
    If value_pos_1 is null if it is then updated. Finist this row and move them to another. If not go to value_pos_2 in
    same rank and check again if the null value. If it's updated, if not, again to go forward. Each value_pos_X cullum has a date_pos_x cullom
    to be made same day as Value_pos_ cullums (if value_pos_X is null then date_pos_X coresponding will be null as well - is)
    a fact in my table).


    So is it feasible using only a single update?

    I managed to write a select statement by using the clause of the case that makes these things perfectly only for value_pos_X fields. I wonder if I can use in my
    Update statement?
    select 
    case when a.value_pos_1 is  null then b.value else 
         case when a.value_pos_2 is  null then b.value else
              case when a.value_pos_3 is  null then b.value else
                   case when a.value_pos_4 is  null then b.value else
                        case when a.value_pos_5 is  null then b.value else to_number('99999','9999,99')
    end
    end
    end
    end
    end  as value
    
    from to_update a,t_employe b
    where a.year = b.year
    and a.line= b.line
    and a.counter = b.counter 
    Suggestions how to extract it from?

    Thank you!
    SQL> select  *
      2    from  to_update
      3  /
    
          YEAR L    COUNTER DATE_POS_ VALUE_POS_1 DATE_POS_ VALUE_POS_2 DATE_POS_ VALUE_POS_3 DATE_POS_ VALUE_POS_4 DATE_POS_ VALUE_POS_5
    ---------- - ---------- --------- ----------- --------- ----------- --------- ----------- --------- ----------- --------- -----------
          2011 3       2946 27-AUG-11        5434
          2011 3       2947 27-AUG-11          11 27-AUG-11         123
          2011 3       2948 27-AUG-11          33 27-AUG-11          44 27-AUG-11        8908
          2011 3       2949 27-AUG-11           1 27-AUG-11           2 27-AUG-11         343 27-AUG-11          78
    
    SQL> merge
      2    into to_update a
      3    using (
      4           select  a.rowid rid,
      5                   b.value
      6             from  to_update a,
      7                   t_employe b
      8             where a.year = b.year
      9               and a.line= b.line
     10               and a.counter = b.counter
     11          ) b
     12     on (
     13         a.rowid = b.rid
     14        )
     15     when matched then update set value_pos_1 = nvl2(value_pos_1,value_pos_1,b.value),
     16                                  value_pos_2 = nvl2(value_pos_1,nvl2(value_pos_2,value_pos_2,b.value),value_pos_2),
     17                                  value_pos_3 = nvl2(value_pos_1 + value_pos_2,nvl2(value_pos_3,value_pos_3,b.value),value_pos_3),
     18                                  value_pos_4 = nvl2(value_pos_1 + value_pos_2 + value_pos_3,nvl2(value_pos_4,value_pos_4,b.value),value_pos_4),
     19                                  value_pos_5 = nvl2(value_pos_1 + value_pos_2 + value_pos_3 + value_pos_4,nvl2(value_pos_5,value_pos_5,b.value),value_pos_5)
     20  /
    
    4 rows merged.
    
    SQL> select  *
      2    from  to_update
      3  /
    
          YEAR L    COUNTER DATE_POS_ VALUE_POS_1 DATE_POS_ VALUE_POS_2 DATE_POS_ VALUE_POS_3 DATE_POS_ VALUE_POS_4 DATE_POS_ VALUE_POS_5
    ---------- - ---------- --------- ----------- --------- ----------- --------- ----------- --------- ----------- --------- -----------
          2011 3       2946 27-AUG-11        5434                  3344
          2011 3       2947 27-AUG-11          11 27-AUG-11         123                  4433
          2011 3       2948 27-AUG-11          33 27-AUG-11          44 27-AUG-11        8908                  4455
          2011 3       2949 27-AUG-11           1 27-AUG-11           2 27-AUG-11         343 27-AUG-11          78                  5544
    
    SQL> 
    

    Or yhis is perhaps more readable:

    merge
      into to_update a
      using (
             select  a.rowid rid,
                     b.value
               from  to_update a,
                     t_employe b
               where a.year = b.year
                 and a.line= b.line
                 and a.counter = b.counter
            ) b
       on (
           a.rowid = b.rid
          )
       when matched then update set value_pos_1 = case when value_pos_1 is null then b.value else value_pos_1 end,
                                    value_pos_2 = case when value_pos_1 is not null and value_pos_2 is null then b.value else value_pos_2 end,
                                    value_pos_3 = case when value_pos_1 + value_pos_2 is not null and value_pos_3 is null then b.value else value_pos_3 end,
                                    value_pos_4 = case when value_pos_1 + value_pos_2 + value_pos_3 is not null and value_pos_4 is null then b.value else value_pos_4 end,
                                    value_pos_5 = case when value_pos_1 + value_pos_2 + value_pos_3 + value_pos_4 is not null and value_pos_5 is null then b.value else value_pos_5 end
    /
    

    SY.

  • Script for updating a field for the current year

    Is it possible to have an update of field at the end of the current year? Example 20-(dashes to change it for any year). I think that it is not possible, but if anyone knows how this is possible I'd really appreciate help. Thank you

    Sorry, I guess I need to change throughout the year, not only at the end.  Thank you

    I tried a few scripts that I found here, such as; year (dateAdd ("yyyy", 1, now()))) with no luck. I confess that I don't know about scripts and can be a bad thing. The script goes on the Action tab as a javascript or somewhere else (validation?) Any advice or assistance would be appreciated. I use Acrobt Pro version 9.

    Going by your post you wanted the year is displayed in a text field, I gave the code to go into the script will count for this field. If you want to use it somewhere else (e.g. a mouseup), then use the variable 'year' in this script. In a calculation script, any value you assign to "event.value" is what will show on the field during the calculation.

  • How can I update userdata with the APIs of the IOM

    Hello

    How can I update userdata (Boolean attribute in the form of xellerate) using the API of the IOM

    example:
    If want to update User Lock


    Thank you

    Published by: user11963802 on April 15, 2010 23:39

    UserData.put ("Users.User ID", msUserId);
    UserData.put ("USR_UDF_IS_FIRST_LOGON", "0");
    userIntf.updateUser (tRs, userdata);

    I hope that tRs is the tcResultSet of the user, i.e., tRs = userIntf.findUser (hashmap).

    When you update by '0', Boolean field is unchecked, to check that you have to pass '1'.

    Thank you
    Suren

Maybe you are looking for