How ins or upd multiple values in a record of diff of the fields by using the cursor

Hai All

I need to insert or update or multiple values in a single diff of one field records to another table.

Table 1 has 3 fields

Bartime bardate barcode

02/01/10 0011, 0815

02/01/10 0022, 0820

02/01/10 0011, 1130

02/01/10 0022, 1145

02/01/10 0011, 1230

02/01/10 0022, 1235

02/01/10 0011, 1645

02/01/10 0022, 1650


These are the times that arrives at 0815 and pauses at 1130 and arrives at 12: 30 a.m. and coming home at 4:45 pm
These table I have to insert into another table called table2
and the fields are bar codes, date, intrinsically timein, introut, tiomout

And the output you want to like this

barcode timein intrinsically introut timeout date
0011 0815 1130 1230 1645 02/01/10

0022 0820 1145 1235 1650 02/01/10

If all give some good answer that it will be help full...

Thanks and greetings

Srikkanth.M

Hi Srikanth,

1. first create a datablock (better do instead of the table because its only for querying details of table 1 for the period) with table1 as table base and better use order by clause in form as "order to barcode, date, bartime.

2. create a second datablock with table2 and get this rank on the two table (second block as base table, because here, you should insert/update)

now on the screen you can see all the data in 2 tables.

3. fix the button of some process.

a time-but-press

Loop

1 block of travel and take a line

Find the same block 2

If code in bars-avail so
-you want to update
on the other
-you want to insert

end if;

end of loop

and 2nd block will be updated / inserted as u desire, and finally, you can save the second block.

Iqbal

Tags: Oracle Development

Similar Questions

  • I'm trying to create another table and insert data to practice... How can I insert multiple values?

    I created another table for practice on two tables queries now.

    That's what I have:

    Insert in the test

    (address, age, status, DriverID)

    values ("131 Shore Drive", "Edison, NJ, 08011 ', ' 55', m ', '2').

    ("' 62 central avenue", "Middletown, NJ 08011', ' 43 ', am ', ' 1'");

    ('98 main street', ' Bristol, PA 19116 ', ' 67', the of ', '3' ").

    ('15 wrong Way', ' Long Island, NY 10111 ', ' 60', 'W', '4' '),

    ("' Kevin 9 Place", "New York, NY 10111 ', ' 25', the of ', '5'");

    It says command SQL is not properly terminated.

    Like this:

    Insert into test (address, age, status, DriverID)

    values ("131 Shore Drive", "Edison, NJ, 08011 ', ' 55', m ', '2');

    Insert into test (address, age, status, DriverID)

    values ("62 Middle Avenue", "Middletown, NJ 08011', ' 43 ', am ', ' 1'");

    ...

  • How does whitespace or null values or characters set effect set in the query?

    Hi all

    I have a question about client side Oracle database tools. I have Oracle 11g installed on the server and I use PL/SQL developer tool to retrieve information from the server and then I copy paste this query in PL SQL Developer my company built in box of function of the application that executes the same query as client tools and the results.

    When I write the request by spaces of the Tools client-side IE the PL/SQL developer tool and copy paste at my request of builtin company gives slow down me execution, but if I remove the white of the query space by copying the application of PL/SQL developer(client side tool) to Notepad first and then copy back at my request and gives me a faster execution.

    For example:

    Original Request: with whitespace

    Select

    *

    Of

    Double

    Ask without spaces faster tracks:

    Select * twice;

    I want to the reason behind this slow execution and also if you could explain in detail would be great that I am no expert oracle.

    Also, I wanted to know that character set parameters from the client side tools slow running query? As I copy the request of PL/SQL developer tool

    Thank you

    HP

    HP, I have has been suggest you determine if the difference in performance is due to how the application prepares and processes SQL or if the difference is in Oracle.  If you can duplicate the issue in Oracle using SQLPLus then you can use the Oracle tools such as autotrace, SQL, trace etc... to determine how Oracle handles each request.  On the other hand if the time of execution in SQLPLus is the same then you know that the problem lies in the application.  Depending on whether you have access to the source you can or will not be able to track down the issue and resolve it.  Otherwise always paste the capture into the plan text and edit it to remove the unnecessary lines before copying them the text into your application tool.

    - -

    HTH - Mark D Powell.

  • How can I select multiple cells in tableview with javafx only with the mouse?

    I have an application with a tableview in javafx and I want to select more than one cell only with the mouse (something like the selection that exists in excel). I tried with setOnMouseDragged but I cant'n do something because the selection only returns the cell from which the selection started. Can someone help me?

    For events of the mouse to be propagated to other than the node in which nodes the drag started, you must activate a 'full-drag-release press gesture' by calling startFullDrag (...) on the original node. (For more details, see the Javadocs MouseEvent and MouseDragEvent .) You can register for MouseDragEvents on cells of the table in order to receive and process these events.

    Here's a simple example: the user interface is not supposed to be perfect, but it will give you the idea.

    import java.util.Arrays;
    
    import javafx.application.Application;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.SelectionMode;
    import javafx.scene.control.TableCell;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.input.MouseDragEvent;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.VBox;
    import javafx.scene.text.Font;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    
    public class DragSelectionTable extends Application {
    
        private TableView table = new TableView();
        private final ObservableList data =
            FXCollections.observableArrayList(
                new Person("Jacob", "Smith", "[email protected]"),
                new Person("Isabella", "Johnson", "[email protected]"),
                new Person("Ethan", "Williams", "[email protected]"),
                new Person("Emma", "Jones", "[email protected]"),
                new Person("Michael", "Brown", "[email protected]")
            );
    
        public static void main(String[] args) {
            launch(args);
        }
    
        @Override
        public void start(Stage stage) {
            Scene scene = new Scene(new Group());
            stage.setTitle("Table View Sample");
            stage.setWidth(450);
            stage.setHeight(500);
    
            final Label label = new Label("Address Book");
            label.setFont(new Font("Arial", 20));
    
            table.setEditable(true);
    
            TableColumn firstNameCol = new TableColumn<>("First Name");
            firstNameCol.setMinWidth(100);
            firstNameCol.setCellValueFactory(
                    new PropertyValueFactory("firstName"));
    
            TableColumn lastNameCol = new TableColumn<>("Last Name");
            lastNameCol.setMinWidth(100);
            lastNameCol.setCellValueFactory(
                    new PropertyValueFactory("lastName"));
    
            TableColumn emailCol = new TableColumn<>("Email");
            emailCol.setMinWidth(200);
            emailCol.setCellValueFactory(
                    new PropertyValueFactory("email"));
    
            final Callback, TableCell> cellFactory = new DragSelectionCellFactory();
            firstNameCol.setCellFactory(cellFactory);
            lastNameCol.setCellFactory(cellFactory);
            emailCol.setCellFactory(cellFactory);
    
            table.setItems(data);
            table.getColumns().addAll(Arrays.asList(firstNameCol, lastNameCol, emailCol));
    
            table.getSelectionModel().setCellSelectionEnabled(true);
            table.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
    
            final VBox vbox = new VBox();
            vbox.setSpacing(5);
            vbox.setPadding(new Insets(10, 0, 0, 10));
            vbox.getChildren().addAll(label, table);
    
            ((Group) scene.getRoot()).getChildren().addAll(vbox);
    
            stage.setScene(scene);
            stage.show();
        }
    
        public static class DragSelectionCell extends TableCell {
    
            public DragSelectionCell() {
                setOnDragDetected(new EventHandler() {
                    @Override
                    public void handle(MouseEvent event) {
                        startFullDrag();
                        getTableColumn().getTableView().getSelectionModel().select(getIndex(), getTableColumn());
                    }
                });
                setOnMouseDragEntered(new EventHandler() {
    
                    @Override
                    public void handle(MouseDragEvent event) {
                        getTableColumn().getTableView().getSelectionModel().select(getIndex(), getTableColumn());
                    }
    
                });
            }
            @Override
            public void updateItem(String item, boolean empty) {
                super.updateItem(item, empty);
                if (empty) {
                    setText(null);
                } else {
                    setText(item);
                }
            }
    
        }
    
        public static class DragSelectionCellFactory implements Callback, TableCell> {
    
            @Override
            public TableCell call(final TableColumn col) {
                return new DragSelectionCell();
            }
    
        }
    
        public static class Person {
    
            private final SimpleStringProperty firstName;
            private final SimpleStringProperty lastName;
            private final SimpleStringProperty email;
    
            private Person(String fName, String lName, String email) {
                this.firstName = new SimpleStringProperty(fName);
                this.lastName = new SimpleStringProperty(lName);
                this.email = new SimpleStringProperty(email);
            }
    
            public String getFirstName() {
                return firstName.get();
            }
    
            public void setFirstName(String fName) {
                firstName.set(fName);
            }
    
            public String getLastName() {
                return lastName.get();
            }
    
            public void setLastName(String fName) {
                lastName.set(fName);
            }
    
            public String getEmail() {
                return email.get();
            }
    
            public void setEmail(String fName) {
                email.set(fName);
            }
        }
    
    }
    
  • Re: How to get Max (all values of columns) records on a partition interval

    Hello
    Hours      Days            Name     used_size
    1     01-09-012     R1     1100
    10     01-09-012     R1     1150
    15     01-09-012     R1     1160
    23     01-09-012     R1     1200
    
    1     01-08-012     R1     1600
    10     01-08-012     R1     1700
    15     01-08-012     R1     1800
    23     01-08-012     R1     1500
    
    1     01-09-012     J1     10
    10     01-09-012     J1     20
    15     01-09-012     J1     30
    23     01-09-012     J1     60
    
    1     01-08-012     J1     70
    10     01-08-012     J1     5
    15     01-08-012     J1     17
    23     01-08-012     J1     22
    
    
    Needed o/p:
    
    23     01-09-012     R1     1200
    23     01-08-012     R1     1500
    23     01-09-012     J1     60
    23     01-08-012     J1     22
    We have table as above, IE. everyday, there are records at regular intervals of hours for different users.

    I want to get a single record of every day for one hour on this day for all users.


    Please let me know if my question was unclear?

    -Thank you

    Another way, maybe more simple here, here could be just group by user, day.

    SELECT user, day, Max(hours) max_hours, Max (used_size) KEEP (DENSE_RANK LAST ORDER BY hours) mh_used_size
      FROM (table)
     GROUP BY user, day
     ORDER BY user, day
    
  • How to url using NOT IN (NIN) IR filter for multiple values?

    Apex 5.0.1 (but should work for Apex 4.2)

    I want to set a url with an IR filter using the filter NOT IN. For example, to get a filter that says: status not in (3,4)

    To do this, we can use the url IRNIN_STATUS parameter.

    This method works. Problem is how can I set multiple values in the url?

    IRNIN_STATUS:3, 4 will give a filter 'status not in (3) '

    4 is interpreted as the following for the next parameter value, even if there is no additional parameters.

    Find / remember the solution:

    We can add the backslashes to values to distinguish them from others.

    IRNIN_STATUS:\3, 4

  • Another REGEXP question: how to extract multiple values from a string

    Hi, how can I retrieve multiple values to a string with RegExp with Oracle SQL constructs?

    Have looked at the various examples, I cannot understand this.
    the following Sql code
    select
       regexp_substr(sessie."rollen", 'CN=A_role') "A_role"
       from ( 
    select '
    CN=A_role,OU=a_org_unit,OU=another_org_unit,DC=bz,DC=ad,DC=min,DC=local
    CN=Another_role,OU=some_org_unit,DC=bz,DC=ad,DC=min,DC=local
    CN=Users,OU=Dep,DC=bz,DC=ad,DC=min,DC=local
    '   "rollen" from dual
    ) sessie;
    Returns CN = A_role.
    I want him back all of the CN = concatenated values with a semicolon and stripped of the CN = bit.
    So: A_role; Another_role; Users .

    Any help would be much appreciated. Here I use database 11g 11.2.0.2.0.

    Does anyone have an idea how to do this in SQL?

    best regards Mike

    Hello
    If using Oracle 11 g

    with tst
      as (select   'CN=A_role,OU=a_org_unit,OU=another_org_unit,DC=bz,DC=ad,DC=min,DC=local,'
                 ||'CN=Another_role,OU=some_org_unit,DC=bz,DC=ad,DC=min,DC=local,'
                 ||'CN=Users,OU=Dep,DC=bz,DC=ad,DC=min,DC=local' as rollen
            from dual
          )
    select listagg(sub, ',') within group (order by rn) as res
      from (select regexp_substr(rollen, '(CN=)([[:alnum:]_]+)',1,rownum,'i',2) sub, rownum rn
              from tst
           connect by level <=length(rollen)
           )
     where sub is not null       
    
  • How to pass multiple values to a data model parameter

    I have a data model, where I put a setting like this.

    Select col1, col2, col3 from table1 where col1 =: param1

    This works very well for a single value that I pass the param1 parameter.

    How can I get this to work when I want to send multiple values for param1. I already checked the box "Multiple values" and tried to change the sql for this code.

    Select col1, col2, col3 from table1 where col1 in: param1

    Looks like I'm missing something here.



    Thanks in advance!
    Kris

    you need to write it as:

    Select col1, col2, col3 from table1 where col1 in (: param1)

    It works for me.

    Klaus

  • The research of Web applications with fields of the Data Source that contains multiple values

    I have a Web application with a field that allows multiple values to be recorded similar to the list box. I need limit the allowed values for a large, over the list of the values currently stored in another Web application as a data source. I can not apply to the type of Data Source field that allows only single value selection. I also need to be able to use the search form Web App to search for items containing 1 OR more of the values in this field (a type of list control field search functionality). Here's what I tried to field types:

    • Text (String) or text (multi-line) field type - By saving a list of values separated by commas (outputs in the same way this list box) to an entry of text or textarea, the search only logic search exact string (including commas) and does not analyze individual values.
    • Type of list (checkbox) field - it allows me to search for multiple values using the logic of the GOLD, but the web application stores only the values that have been entered as an option in the field settings real web app. I tried to use a checkbox with minimal or empty options list, hoping that some values I sent more separate by a comma value chain would be still stored, but because the values come from my Web App data source and not stored with the field options list, they were not saved.

    Someone at - he found a way to do it?

    My other question is how can I use a multivalued field to similar as described above but return results containing the elements with ALL the values of this field (AND logic).

    Can someone enlighten me to the inner workings of the search BC logic web app?

    You don't need to use the predefined boxes or types of entries. Everything you can represent as a string (such as the values separated by commas in your example) can be saved in any field of webapp. The types of fields defined in the Web application are only used to translate internal representation (all channels) to the various user-friendly interpretations (checkboxes, radios, dates, links, etc.)

  • Using the index of multiple values

    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.


    Thank you

    D wrote:
    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.

    Thank you

    I remember, values multiple index refers to a different concept: a multivalued index means that you can retrieve a collection of values of similar role of an attribute on which you can do Contains, ContainsAll filtering, and ContainsAny.

    In this case to fully the lever consistency of querying capabilities, you would
    - either add a sorted index with a custom comparator that compares the tables containing a salary and a Department on a first salary so the base of the Department and add a filter custom which is able to take advantage of the index for the request for the salary and also able to filter on the element of the array of index service
    -Add two independent indices (a sorted index of wages and a unsorted for the Department), in which case you can leverage all existing (GreaterThanFilter, EqualsFilter and AndFilter) code

    Best regards

    Robert

  • Multiple values per column in the stacked bar chart

    I want to use a bar chart stacked in a dashboard of the process, but I am wondering how I can add multiple values per column, because through the available methods, you can only add one value per column. I add some values to hardcode and I get the chart but, for example, I want to add series anocher in the table named 'Closed' and values for this in each column (January, February, etc.)

    Data source for filling
    result as a Fuego.Chart.DefaultXYDataSource
    result = Fuego.Chart.DefaultXYDataSource ("Opened");

    addValue result
    using
    value = 5,
    columnHeader = "January".

    addValue result
    using
    value = 10,
    columnHeader = "February".

    addValue result
    using
    value = 15,
    columnHeader = "March".

    addValue result
    using
    value = 7,
    columnHeader = "April".


    I enjoyed your collaboration if you have worked with graphics stacked bar.

    Hello

    You were very close.

    Try to use the Fuego.Chart.XYZDataSourceImpl object. This will give you the third dimension that your stacked bar chart needs and these attributes in the addValue method:

  • value
  • rowHeader (maybe that's where you set your month name)
  • columnHeader (maybe it's where set it to 'Open' or 'Closed' in your example)

    Dan

  • Multiple values in the Variable.

    How can I assign multiple values to a variable in the RPD?
    I want 'NY', 'CA', 'HE', 'TX' declares a variable, is it possible? If so, how?
    Thank you.

    Hello

    In your init block change for initialization and use SQL statements like this:

    Select 'STATE', Sun-places where the State IN ('NY', 'CA', 'HE', 'TX')

    This will create a STATE variable that has all of these values in it.

    You can then use it in a report as a filter [column name] = STATE the server OBIEE should automatically turn this into one for physics SQL.

    Kind regards

    Matt

  • How to make a multiple numeric value to another page

    Dear Experts,

    Apex 4.1

    Oracle 11g

    I would like to pass multiple numeric value to another page, as below:

    P1_ID = (11,22,33) POINT Page1 depend on what users chose

    P2 SQL: SELECT * FROM TABLE WHERE ID IN (11,22,33), ID is numeric fields.

    but the PAGE 2 to show the error invalid number, how to fix, please help me.

    Thanks and greetings

    Yong Huang wrote:

    Dear Experts,

    Apex 4.1

    Oracle 11g

    I would like to pass multiple numeric value to another page, as below:

    P1_ID = (11,22,33) POINT Page1 depend on what users chose

    P2 SQL: SELECT * FROM TABLE WHERE ID IN (11,22,33), ID is numeric fields.

    but the PAGE 2 to show the error invalid number, how to fix, please help me.

    This is the classic problem 'variable IN the list' (I have no idea why this misunderstanding is so widespread. Always seemed obvious to me that it doesn't). In

    select * from table where columnvalue in (7788, 7839, 7876)
    

    (7788, 7839, 7876)is a list of expressions and the predicate is evaluated as a membership condition.

    In

    select * from table where columnvalue in :P1_X
    

    :P1_Xis a scalar string, unable to contain multiple values.

    In a report of type APEX, a source report of the body of the PL/SQL function returning a SQL query with lexical substitution can be used to produce a "variable list:

    return 'select * from table where columnvalue in (' || :P1_X || ')';
    

    where P1_X contains less than 1000 values, has been disinfected to code SQL injectionand string values are properly cited.

    Some people suggest the following approach, that will work also in interactive APEX reports:

    select * from table where instr(':' || :P1_X || ':', ':' || columnvalue || ':') > 0
    

    However, it is underperforming because it eliminates the possibility of using the index optimizer or the size of the partition in the execution plan.

    See various elements in the list to ask Tom and imitating the channel to the table using sql features for effective solutions.

  • How to use Ajax get multiple values in an array?

    Hi All-

    I am using AJAX to get multiple values in a table using example of Denes Kubicek in the following link-

    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606:NO:

    Basically, I want to use the drop-down list to fill the rest of the values in the form.

    I created the example (Ajax get several values, 54522 application) on the Oracle site.

    http://apex.oracle.com/pls/apex/f?p=4550:1:0:

    Workspace: iConnect

    Login: demo

    password: demo

    I was able to reproduce his example on page 1 (homepage).

    However, I want to use system generate a table to complete this example and was not able to complete the data correctly.

    Page 2 (method 2) is that I'm struggling to fill the column values. When I checked the item application values in the Session, and values seems to be filled properly.

    That's what I did on this page:

    1 create an Application process on-demand - Set_Multi_Items_Tabular2:

    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
    
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
    
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    
    
    
    
    
    

    2. create two objects application - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2

    3. put the following text in the Page header:

    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
    }
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);    
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                }
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
                    }
                }
            }
        }
        get = null;
    }
    </script>
    
    
    Add the follwing to the end of the above JavaScript:
    
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    {
     var s = filter.id;
     var item = s.substring(3,8);
     var field2 = list2 + item;
     
     f_set_multi_items_tabular2(filter, field2);
    }
    
    
    
    
     
    
    
    

    4 query in the form:

    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    
    
    
    
    
    

    5. in the column of Book_ID_DISPLAY attribute:

    Add the following code to the attributes of the element: onchange = "javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#'); »

    Changed-> onchange = "javascript:setLOV(this,'f03'); »

    Now, T_ROWNUM2 returns the value as f03_0001. But TEMPORARY_APPLICATION_ITEM2 returns in the form [object HTMLSelectElement]...

    Please help me to see how I can fill the data in the tabular presentation format. Thank you in advance!

    Ling

    Updating code in red...

    Ling

    LC says:

    Application Item Value Item Name
    54522 3 TEMPORARY_APPLICATION_ITEM2
    54522 f03_0003 T_ROWNUM2

    No T_ROWNUM2 should be 0003.

    I made a copy of your page to make corrections.

    There are several problems.

    First you where submiting T_ROWNUM2 whereas you would use: t_rownum in the pl/sql code.

    I changed the name of the element in the f_set_multi_items_tabular2.

    Secondly you where now affecting the rownumber f03_0001 for the first line.

    Resulting XML returned as follows.

    this xml genericly sets multiple items
    CSS Mastery
    22
    Andy Budd
    1
    
    

    I changed the following text in the show_lov.

    var point = s.substring (4.8);

    var Field2 = item;

    I also had a compilation of pl/sql code error, there was a); missing the end of the last item. Fixed that too.

    But why do you think lpad won't work for lines 10 and more.

    LPAD ('10', 4, '0') will give "0010"

    LPAD ('100 ', 4,'0 ') will give "0100"

    LPAD ('1000 ', 4,'0 ') will give '1000'

    So unless you have more than 9999 lines you would have no problem.

    Nicolette

  • How to pass multiple values of payload through the contextual event - jdev 11.1.2.3

    Hello:

    How to configure contextual events publish several values of payload?

    On click of a button, I'm declaritively publish a contextual event, which works very well when a single value is passed to the event handler.

    My event handler method has the signature of:
    eventHandler (String)

    But now I also have an oracle.jbo.domain.Number, so my new eventHandler looks like this:
    eventHandler (Number, String)

    How to pass two values during editing of the event and how to place the payload with multiple values for the new eventHandler?

    All article or code would be greatly appreciated.

    Thanks for the help.

    You define a bean holding your values and pass an instance of the bean as a payload...

    Timo

Maybe you are looking for

  • Configure the HTML validator in Firefox 15

    I have FireFox 15 and use the HTML tools and validate. I need to configure it to show all of the code and the number of lines that it validates. When I do tools change the line has options such as: http://validator.w3.org/check?verbose=1&uri= Where c

  • How can I run version 3.6.8 and the beta as of separate applications without a crash?

    I ran the beta before, recently I downloaded version 3.6.8 and replaces the beta version. How can I download and run each as separate application without a crash? IS S/O

  • Workstation Mobile Zbook 14: restore Windows 10 Zbook 14

    Then when I updated to Windows 10, I kept getting BSoD error of internal power (which was fairly common apparently with AMD for w10). So, I leave the computer to reset and install a clean version of Windows 10 and now it does not recognize my card AM

  • WRT54G2 more ports to transmit

    Then. As the title says: How can I activate more ports to transmit? I want just the port forward more applications on my PC. (my router is a WRT54G2) 4) G2WRT54G2 Kind regardsJocelynefiset

  • With the help of message Transport.more)

    I'm defining the message as being open after receiving the rest of the message when calling "Transport.more". I tried to call "message.setFlag (Message.Flag.OPENED, true);" where to pick up the rest of the body part after that my interlocutor notify