Table with object array data provider

hi!
i use the studio creator table and want to fill it with an object array data provider!
i have an array and the getter:
  public TanData[] getTanDataArray()
        return tanDataArray;    
    }i choosed this for the data provider and in table layout i choose the dataprovider, but when i run my application there are no datas found although the array isn't empty!

maybe this is a problem:
i got my data from a database table and i store it in a vector.
in the example they have a class WeekBean and they fill their array with
   WeekBean[] weeks = {
            new WeekBean(1),
            new WeekBean(2),
            new WeekBean(3),
            new WeekBean(4)
        };and i tried to do this:
    private Vector<TanData> tanDataList = new Vector();
    private TanData[] tanDataArray;
   getTanDataList().copyInto(tanDataArray);could it be that that isn't correct?

Similar Messages

  • Object Array Data Provider Refresh Possible bug

    Hello
    I am having a problem with Object Array Data Provider in terms that the table's data is not changed corectly after a request as expected, but after two requests.
    Steps to reproduce the bug:
    0. Create a new Visual Web project, call it 'test'.
    Set 'Bundled Tomcat ' or 'Sun 9' as deploy target server.
    Edit 'Page1' of the project.
    1. Create an Entity class, simple class that has only getters and setters with a few fields (lets say 'id' and 'name').
    2. In the SessionBean1 that is generated by the framework create an array of Entity class named 'entityArr', and getters and setters for this field.
    3. Add a new Array Object Data Provider on the page and set in its properties as array the array created in the previous step 'entityArr (SessionBean1)'.
    4. Add a new table component, and set as data provider the provider created in step 3.
    In the Table's Layout map the fields from the Entity class, and set whatever compnents you desire for each component's type or leave the default ones (Static Text).
    5. Add a 'property change trigger component' on the page. I called it like this because I tried the following :
    5.1 A text field and a button to submit the text value
    5.2 A Calendar component with autosubmit
    5.3 A DropDown with autosubmit.
    6. On the property change trigger component created at step 5 set a value_changed method that changes the the array that should be displayed by the table.
    For Example, for a DropDown component, you will have a method like this :
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    String idStr = (String) event.getNewValue();
    System.out.println("Entity id :"+idStr);
    if(idStr .equals("item1")) {
    fillSessionBean1(true);
    else {
    fillSessionBean1(false);
    getSessionBean1().setItemName(idStr);
    private void fillSessionBean1(boolean fillValues) {
    Entity[] values ;
    if(fillValues) {
    values = new Entity[4];
    for ( int i=0;i<values.length; i++) {
    Entity entity = new Entity();
    entity.setDescription("Description "+i);
    entity.setName("Name "+i);
    entity.setId(i) ;
    values[i] = entity;
    else {
    //values = new Entity[0];
    values = null;
    getSessionBean1().setEntityArr(values);
    7. When running the program, if the selected is Item1, the table does not show the array set if on this branch.
    I am using :
    Netbeans 5.5 build 20061017100,
    Visual Web Pack 070104_2,
    Ent.Pack 20061212
    jdk 1.6.0
    Operating Systems : Both Linux Suse10 and Windows.
    If anyone has a solution for this please let me know.

    OK
    While no one responded, I had to think for myself.
    There is a bug in the code generated by netbeans or there is nowhere specified that if you attach an array to a data provider you will have to notify by hand the data provider that the array has changed.
    You will have to put this line that is generated in init function in your valuechanged functions :
    objectArrayDataProvider1.setArray((java.lang.Object[])getValue("#{SessionBean1.entityArr}"));
    I think this aproach is a little bit wrong, even it works.
    I believe the data provider should be notified the array has been changed.
    There could be a much more simple aproaches :
    1. In the code generated by netbeans, if you attach an array to a data provider the data provider will be notified after any set(Object[])
    2. The data provider could have a function so you will ne anle to attach to the data provider an Object (the session bean, in my case) and the name of the function that retrieves the array (in my case, 'getEntityArr') .
    The code generated by netbeans could add this function easily.
    Maybe there are any other better aproaches, and I might be wrong.
    It's good that it works.

  • How to initialize Object  Array Data Provider (OADP)with data from txt file

    Hi,
    I want to show in a table some columnar data from a txt file. I ran the creator demo application on OADP successfully. http://blogs.sun.com/divas/entry/using_the_object_array_data
    I created a javabean class to read a txt file.However, I am stuck at how I can fill the data into an OADP array:
    I am familiar with C extensively but not much at java. can anyone help??
    thanks..
    dr.am.mohan rao

    Thanks for that. I changed it a little bit, but when i ran this script, got ORA-06532: Subscript outside of limit.
    declare
    O_voucher_comment SYSADM.AP_COMMENT_COLL := sysadm.ap_comment_coll(null);
    begin
    FAS_AP_EXCEPTIONS.GET_VOUCHER_COMMENTS('FCCAN', '20494753', 0, 'KEHE', O_voucher_comment);
    end;
    PROCEDURE get_voucher_comments (
    v_bu_in IN VARCHAR2,
    v_voucher_in IN VARCHAR2,
    v_line_in IN NUMBER,
    v_userid IN VARCHAR2,
    voucher_comment OUT      sysadm.ap_comment_coll
    IS
    i NUMBER := 1;
    v_comments VARCHAR2 (254) := ' ';
    comment_type sysadm.ap_comment_type;
    v_line_num NUMBER := 0;
    CURSOR get_all_comment
    IS
    SELECT voucher_line_num, descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in;
    CURSOR get_line_comment
    IS
    SELECT descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in
    AND voucher_line_num = v_line_in;
    BEGIN
    --voucher_comment() := SYSADM.ap_comment_type (NULL, NULL, NULL, NULL, NULL, NULL);
    --' ', ' ', 0, ' ', '', ' ' sysadm.ap_comment_coll
    voucher_comment := sysadm.ap_comment_coll(null);
    IF v_line_in = 0
    THEN
    OPEN get_all_comment;
    LOOP
    FETCH get_all_comment
    INTO v_line_num, v_comments;
              if i > 1
              then
                   voucher_comment.EXTEND;
              end if;
    voucher_comment (i) := ap_comment_type (v_bu_in,
    v_voucher_in, v_line_num, v_userid,
    TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS'), v_comments );
    i := i + 1;
    END LOOP;
    ELSE
    OPEN get_line_comment;
    LOOP
    FETCH get_line_comment
    INTO v_comments;
              voucher_comment.extend(6);
    voucher_comment (i) := ap_comment_type (v_bu_in, v_voucher_in, v_line_num, v_userid, TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS' ), 'DD-MON-YYYY HH24:MI:SS'), v_comments);
    i := i + 1;
    END LOOP;
    END IF;
    END get_voucher_comments;

  • Netbeans 5.5 + VWP and Object List Data Provider

    Hi there.
    I'm trying to build an Object List Data Provider as in fieldguide_08_dataProviders.
    I'm using Netbeans 5.5 + VWP
    When I try to "Configure the Table" on page 360, there are some difference.
    When I select Object List Data Provider and drop it on the Table component opens an unexpected choose for the target, then I choose tableRowgroup1.
    The JSP souce don't change and is still
    <ui:tableRowGroup binding="#{Schedule.tableRowGroup1}" id="tableRowGroup1" rows="10"
    sourceData="#{Schedule.defaultTableDataProvider}" sourceVar="currentRow">
    When I select objectListDataProvider1 the drop down opposite property list doesn't work. The button opens a selection window with no items.
    Regards.

    A better resource is http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/hibernate.html#object in conjunction with http://blogs.sun.com/LongLiveThePepper/entry/using_netbeans_visual_web_pack

  • How to populate a jsf table with an array?

    I have a JSF project where I'm using a table and I would like to populate that table with some custom information without using a database. I'm trying to write my own data provider. I was wondering if anyone knows how to populate a jsf table using an array. Any help would be appreciated. Thanks.

    Hey thanks for replying. I'm not quite sure what you mean, but I am using a woodstock table in Netbeans. I would love to skip writing the data provider since I've never done that before, but I'm not sure how I would go about populating the table with a regular List or Model. I have populated a JTable with my own model, but never a woodstock table. They don't seem to work the same way. Thanks for the help. I've spent hours trying to figure this out.

  • Building a table with a string data type

    I am using the Build Table function and I would like to be able to label my columns on the first iteration with a string data type, which doesn't seem to be an acceptable signal for the Build Table function. However, the express table is located under "text indicators" on the front panel, so it seems like there should be a way to do this..

    Ah, the "Build Table" Express VI. I hate Express VIs.
    That Express VI is nothing more than a really complicated way of creating a 2D array of strings. The Express VI has no inputs for the row and column headers, so you need to add them in yourself. The same would be true for a regular table control/indicator. Here's what you need to do:
    Right-click on the table indicator and select Visible Items -> Column Headers.
    Right-click on the table indicator and select Create -> Property Node -> Column Header Strings[]. LabVIEW will attach a property node to the cursor and switch to the block diagram. Plop down the property node on the block diagram.
    Right-click on the property node on the block diagram and select "Change All to Write".
    Right-click on the property node and select "Create -> Constant". This will give you an array of strings, and you can enter the column headers in each array element.
    Wire the array to the property node.
    Connect the property node to the Build Table Express VI using the error clusters.
    Message Edited by smercurio_fc on 07-02-2008 09:25 AM
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • Creating a selectable HTML table with Sahrepoint list data dind

    Hi All,
    I m creating an app for sharepoint2013 , on my app I want to read data from SP list and display on something like HTML table/ grid view.
    What I have done is as follows.
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="TermList">
                        <thead>
                            <tr>
                                        <th>Start Date</th>
                                <th>End Date</th>
                                <th>Term Type(s)</th>
                                <th>Specialty</th>
                                <th width="12%">Sub Specialty</th>
                            </tr>
                        </thead>
                                            <tbody>
                            </tbody>
    </table>
    var context = SP.ClientContext.get_current();
    var user = context.get_web().get_currentUser();
    var Termsitems, web, hostcontext, currentusertitle;
    var hosturl;
    (function () {
    $(document).ready(function () {
        gethostdata();
        getUserName();
        $('#TermList').dataTable(
                        "sScrollY": 200,
                            This will enable jQuery UI theme
                        "bJQueryUI": true,
                            will add the pagination links
                        "sPaginationType": "full_numbers"
        getTermdetails();
    function gethostdata() {
        hosturl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
        context = new SP.ClientContext.get_current();
        hostcontext = new SP.AppContextSite(context, hosturl);
        web = hostcontext.get_web();
        context.load(web, 'Title');
        context.executeQueryAsync(onSiteLoadSuccess, onQueryFailed);
    function onSiteLoadSuccess(sender, args) {
        //   alert("site title : " + web.get_title());
    function onQueryFailed(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
    function getQueryStringParameter(urlParameterKey) {
        var params = document.URL.split('?')[1].split('&');
        var strParams = '';
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split('=');
            if (singleParam[0] == urlParameterKey)
                return decodeURIComponent(singleParam[1]);
    // This function prepares, loads, and then executes a SharePoint query to get the current users information
    function getUserName() {
        context.load(user);
        context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
    // This function is executed if the above call is successful
    // It replaces the contents of the 'message' element with the user name
    function onGetUserNameSuccess() {
    currentusertitle= user.get_title();
      $('#message').text('Hello ' + user.get_title());
    // This function is executed if the above call fails
    function onGetUserNameFail(sender, args) {
        alert('Failed to get user name. Error:' + args.get_message());
    function getTermdetails() {
        var Termlist = web.get_lists().getByTitle("TraineeTermsSPlist");
        context.load(Termlist)
        var camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Title" />' +
                                 '<Value Type="Text"> + currentusertitle + </Value></Eq></Where></Query></View>');
        Termsitems = Termlist.getItems(camlQuery);
        context.load(Termsitems);
        context.executeQueryAsync(getTermdetailsQuerySuccsess, getTermdetailsQueryFails)
    function getTermdetailsQuerySuccsess(sender, args) {
        var listEnumerator = Termsitems.getEnumerator();
        var datatable = document.getElementById("TermList");
        while (listEnumerator.moveNext()) {
            var oListItem = listEnumerator.get_current();
            var startdate = listEnumerator.get_current().get_item('startdate');
            var enddate = listEnumerator.get_current().get_item('Enddate');
            var termtype = listEnumerator.get_current().get_item('TermType');       
            var Specialty = listEnumerator.get_current().get_item('Specialty');
            var Specialty = listEnumerator.get_current().get_item('Subspecialty');
            $("#TermList").append("<tr align='middle'  class='gradeA'>" +
                                      "<td align='left'>" + startdate +
    "</td>" +
                                      "<td align='left'>" + enddate + "</td>"
    +
                                      "<td align='left'>" + termtype + "</td>"
    +
                                      "<td align='left'>" + Specialty +
    "</td>" +
                                      "<td align='left'>" + Specialty +
    "</td>" + "</tr>");
    function getTermdetailsQueryFails(sender, args) {
        alert(' Error:' + args.get_message());
    Now what I want to do is allow user to select rows on the table. Once they select a row I want to get that selected row and search SP list based on the selected value.  Also I would like to make this table with search area to search records.
    Can someone please help me to do this, or are there any easy way to do this. Sample code or useful link much appreciate.
    Thank you very much.
    d.n weerasinghe

    Instead of writing in dive each and every time directly,
    just have a div in html, and inside the while loop
    write and store in the variable like
      output += "<li><a href='#' style='display:none'>" + usernames[i] + " </a> "
                         + "<table id='results' width='100%'>"
                         + "
    <tr style='border-bottom:1px silver solid;'>"
                         + "
    <td style='width:60px;height:70px;' >"
                         + "
    <img alt=\"profile pic\" src= '" + pictureuri[i] + "'  style='width:60px;height:60px;'/>"
                         + "
    </td>"
                         + "
    <td >"
                         + "
    <table style='height:100%'>"
                         + "
    <tr>"
                         + "
    <td style='padding-padding-vertical-align:top;height:10px' >"
                         + "
    <a href='" + personaluri[i] + "' classq='ms-bold ms-subtleLink' style='color: gray; font-size: 12px; font-weight: bold;'>" + tempnames[i] + "</a>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    <tr>"
                         + "
    <td  style='padding-vertical-align:top;height:50px;color:#ADAEAD;font-size:14px;' >" + deptNames[i]
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    </table>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "</table>"
                         + "</li>"
    and finaly oyutside the loop 
    $(#div).html(output);

  • In sm30, when save, how to fill the table with the system data in the table

    Hi all, in SM30, we have user name and time fields, when we create record, after we click the SAVE button, it will automatically fill the fields with the system data, how can we realize it?

    Hi ,
    Do like this.
    1. Go to SE11 -> give your table name and press on change button .
    2.Go to Menu->Utilities-> Table Maintainance Generator , then it will take you another screen .
    3.Assign Functin group if already have one , other wise create function group and assign
    4.Go to Menu->Environment->Modification->Events , again it will take you to another screen
    5.Click on new entries
    ->Now press F4 in T column . Select<u> "01" - Before saving the data in the database</u> and in form routinue give any name of the routinue like "SAVE_USER_DATA" and press enter then u can see an editor symbol in next column click on that it will take you ABAP editor there type this code .
    ztable-username = sy-uname.
    ztable-createtime = sy-uziet.
    check and activate the code .
    With this your job will be complete . Now while entering data just leave columns blank , they will insert corresponding username and time
    Don't forget award points if it helps you.
    Regards,
    Raghav

  • Best way to generate one record per day from a table with eff/exp dates

    Hi,
    Have a table which has various attributes and an eff and exp date. e.g attributea, 01/05/2012, 16/05/2012
    We wish to create another table from this table to have one record per day. e.g 16 records.
    What is best way to achieve this in OWB ?
    Thanks

    Hi,
    Example if have table
    with following contents
    conversion_rate number(6,4)
    EFFEcTIVE_DATE DATE
    expiration_date date
    example record 1.43, 01/05/2012,16/05/2012
    If want to have another table which instead has 16 records one for each day
    e.g
    1.43, 01/05/2012
    1.43,02/05/2012
    1.43,16/05/2012
    Thoughts on best way to do this.
    Thanks

  • I need help making tables with all my data. What to do with all my Data?

    Hello All,
    Here is the scenario. I have about 10 columns of data. It has Name of Item. Price sold, Shipping Cost, Address and others.
    I want to group all the same items into a separate table with its own totals. There is 100 different items, So i need to split is several tables. Any idea on how to do this? Can It be done in Numbers?

    A variation to Jerry's suggestion:
    You are inquiring about creating 100 tables that produce summaries, 1 for each item. Jerry suggests a single table showing only a summary of your 100 items. This has potential. If you want to see the individual lines displayed above each summary, you may be able to use your original table. This process, however, involves a little work. But it's not unreasonable and may satisfy your needs.
    In your original table create a new line for each item. These lines are basically blank except for the item name and whatever columns you want to summarize. Enter the item names on these lines but follow them with the word " Total". When you sort on the Item column these lines will appear as the last of each item. Then place the SUMIF function in the proper column to obtain your summary.
    pw

  • Spatial index on table with object-column (and inheritance)

    Hi!
    Is it possible to create a spatial index on a table with an object-column (and inheritance) like this:
    CREATE OR REPLACE TYPE feature_type AS OBJECT (
    shape MDSYS.SDO_GEOMETRY
    ) NOT FINAL;
    CREATE OR REPLACE TYPE building_type UNDER feature_type (
    name VARCHAR2(50)
    CREATE TABLE features ( no NUMBER PRIMARY KEY, feature feature_type);
    [...] user_sdo_geom_metadata [...]
    Then
    CREATE INDEX features_idx ON features(feature.shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    throws:
    ORA-01418: specified index does not exist
    Curious! :)
    If I define feature_type with "NOT FINAL" option but without subtypes, I get (create index):
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01460: unimplemented or unreasonable conversion requested
    So I think besides object tables also inheritance isn't supported whith oracle spatial!?
    Thanks,
    Michael
    ps:
    We use Oracle9i Enterprise Edition Release 9.0.1.4.0 / Linux.
    Solves Oracle9i 9.2 this problems?

    Hi
    You'll need to be on 9.2 to do this....
    Dom

  • Create table with overlapping parallel dates in individual columns

    I am trying to combine data from two different tables into a single table.
    The data in table 1 contains unit locations of patients within a hospital where each record represents one location. Patients can be transferred many times between different beds resulting in many records for a single visit.
    The data in table 2 contains operating room activity of the patient in the hospital where each record represents either the OR of the recovery room stay. A patient may have multiple operations in one visit.
    I would like to join/merge/mashup the data into a single table that has the data parallel to each other. That is, the dates for the unit activity on one side of the table and the OR activity on the other. The difficulty is that the two sets of in/out dates overlap. I would like the final table to split the original records into new records when the overlaps do not coincide.
    Example:
    Original Events in two records (one per table)
    > Unit Event A - from 2pm to 6pm
    > OR Event B - from 4pm to 5pm
    Results in 3 records (in final table)
    > Event 1 - Unit from 2pm to 4pm, OR dates null
    > Event 2 - Unit from 4pm to 5pm, OR from 4pm to 5pm
    > Event 3 - Unit from 5pm to 6pm, OR dates null
    Of course the overlapping may be more complex that the above example, and adding in and out code to indicate "phantom" transfers will be needed as well.
    In the code below, the first OR visit occurs during the first unit record.
    Jason
    Oracle 10g
    [code]
    create table delme_Unit_dates
    ( id            varchar2(20)
    , unit_rcd_id   varchar2(20)
    , Unit_desc     varchar2(20)
    , Unit_in_code  char(1)
    , Unit_in_dttm  date
    , Unit_out_dttm date
    , Unit_out_code char(1));
    create table delme_or_dates
    ( id            varchar2(20)
    , OR_rcd_id     varchar2(20)
    , OR_desc       varchar2(20)
    , OR_in_code    char(1)
    , OR_in_dttm    date
    , OR_out_dttm   date
    , OR_out_code   char(1));
    create table delme_all_dates
    ( id            varchar2(20)
    , Unit_OR_id    varchar2(40)
    , Unit_rcd_id   varchar2(20)
    , Unit_desc     varchar2(20)
    , Unit_in_code  char(1)
    , Unit_in_dttm  date
    , Unit_out_dttm date
    , Unit_out_code char(1)
    , OR_rcd_id     varchar2(20)
    , OR_Desc       varchar2(20)
    , OR_in_code    char(1)
    , OR_in_dttm    date
    , OR_out_dttm   date
    , OR_out_code   char(1));
    insert into delme_unit_dates values ('123456','U1111','Unit A','A',to_date('2013-04-29 5:02:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-09 1:06:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'B');
    insert into delme_unit_dates values ('123456','U1112','Unit A','B',to_date('2013-05-09 1:06:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-09 4:53:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'B');
    insert into delme_unit_dates values ('123456','U1113','Unit A','B',to_date('2013-05-09 4:53:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'),'T');
    insert into delme_unit_dates values ('123456','U1114','Unit D','T',to_date('2013-05-10 10:52:00 PM', 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'),'B');
    insert into delme_unit_dates values ('123456','U1115','Unit D','B',to_date('2013-05-11 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-12 4:00:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'B');
    insert into delme_unit_dates values ('123456','U1116','Unit D','B',to_date('2013-05-12 4:00:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-16 2:14:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'T');
    insert into delme_unit_dates values ('123456','U1117','Unit Z','T',to_date('2013-05-16 2:14:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-17 2:26:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'B');
    insert into delme_unit_dates values ('123456','U1118','Unit Z','B',to_date('2013-05-17 2:26:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-20 11:30:00 AM', 'yyyy-mm-dd hh:mi:ss am'),'D');
    insert into delme_or_dates values ('123456','OR2221','OR 1','O',to_date('2013-05-09 7:35:00 AM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'),'R');
    insert into delme_or_dates values ('123456','OR2222','RR 5','R',to_date('2013-05-09 10:56:00 AM', 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-09 3:20:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),'U');
    insert into delme_or_dates values ('123456','OR3331','OR 2','O',to_date('2013-05-16 7:59:00 PM' , 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'),'R');
    insert into delme_or_dates values ('123456','OR3332','RR 8','R',to_date('2013-05-16 10:43:00 PM', 'yyyy-mm-dd hh:mi:ss am'),to_date('2013-05-17 11:20:00 PM', 'yyyy-mm-dd hh:mi:ss am'),'U');
    commit;
    -- this is nowhere near to what is needed
    select
      U.*
    , o.*
    from  
      delme_Unit_dates U
    , delme_OR_dates   O
    where
        U.id = o.id
    and U.UNIT_IN_DTTM  <= O.OR_IN_DTTM
    and U.UNIT_OUT_DTTM >= O.OR_IN_DTTM
    order by U.UNIT_IN_DTTM, O.OR_IN_DTTM
    [/code]
    Message was edited by: Jason_S (Changed one date from '2013-05-16 3:20:00 PM' to '2013-05-09 3:20:00 PM')

    I edited one of the dates in the original post.
    Both the inpatient unit and OR events are contiguous for a given patient (no overlaps and no gaps -- after data is cleaned) .
    I have no problem with a view instead of a table, and would probably prefer a view.
    There are about 3 million records in the inpatient unit table and 0.5 million in the OR table.
    Below is how I would like the final table (assuming I correctly split the records). I've used X's to represent the phantom movements. It seems that one should never have a phantom X in both the UNIT_IN_CODE and the UNIT_OUT_CODE (same for out codes).
    FYI, The B's mean transfer within a unit (change room/ed), the T's transfer between units, O's enter OR, R's enter recovery room.
    Also, the may be a future need to add an additional set of parallel dates (attending physician service)!
    ID
    UNIT_OR_ID
    UNIT_RCD_ID
    UNIT_DESC
    UNIT_IN_CODE
    UNIT_IN_DTTM
    UNIT_OUT_DTTM
    UNIT_OUT_CODE
    OR_RCD_ID
    OR_DESC
    OR_IN_CODE
    OR_IN_DTTM
    OR_OUT_DTTM
    OR_OUT_CODE
    123456
    U1111-
    U1111
    Unit A
    A
    04/29/2013 17:02
    05/09/2013 7:35
    X
    123456
    U1111-OR2221
    U1111
    Unit A
    X
    05/09/2013 7:35
    05/09/2013 10:56
    X
    OR2221
    OR 1
    O
    05/09/2013 7:35
    05/09/2013 10:56
    R
    123456
    U1111-OR2222
    U1111
    Unit A
    X
    05/09/2013 10:56
    05/09/2013 13:06
    B
    OR2222
    RR 5
    R
    05/09/2013 10:56
    05/09/2013 13:06
    X
    123456
    U1112-OR2222
    U1112
    Unit A
    B
    05/09/2013 13:06
    05/09/2013 15:20
    X
    OR2222
    RR 5
    X
    05/09/2013 13:06
    05/09/2013 15:20
    U
    123456
    U1112-
    U1112
    Unit A
    X
    05/09/2013 15:20
    05/09/2013 16:53
    B
    123456
    U1113-
    U1113
    Unit A
    B
    05/09/2013 16:53
    05/10/2013 22:52
    T
    123456
    U1114-
    U1114
    Unit D
    T
    05/10/2013 22:52
    05/11/2013 11:30
    B
    123456
    U1115-
    U1115
    Unit D
    B
    05/11/2013 11:30
    05/12/2013 16:00
    B
    123456
    U1116-
    U1116
    Unit D
    B
    05/12/2013 16:00
    05/16/2013 14:14
    T
    123456
    U1117-
    U1117
    Unit Z
    T
    05/16/2013 14:14
    05/16/2013 19:59
    X
    123456
    U1117-OR3331
    U1117
    Unit Z
    X
    05/16/2013 19:59
    05/16/2013 22:43
    X
    OR3331
    OR 2
    O
    05/16/2013 19:59
    05/16/2013 22:43
    R
    123456
    U1117-OR3332
    U1117
    Unit Z
    X
    05/16/2013 22:43
    05/17/2013 14:26
    B
    OR3332
    RR 8
    R
    05/16/2013 22:43
    05/17/2013 14:26
    X
    123456
    U1118-OR3332
    U1118
    Unit Z
    B
    05/17/2013 14:26
    05/17/2013 23:20
    B
    OR3332
    RR 8
    X
    05/17/2013 14:26
    05/17/2013 23:20
    U
    123456
    U1118-
    U1118
    Unit Z
    B
    05/17/2013 23:20
    05/20/2013 11:30
    D
    Jason

  • Question with object arrays..

    This is my code and it doesn't seem to be working properly
    public class familymember {
    public familymember(){
    Object[] array=new Object[500];
         public static void main(String args[]) {
         familymember array2 = new familymember();
         array2.array[51] = "500";
              System.out.println( array2.array[51]);
    I get the error message
    Error : No variable array defined in class familymember.
    familymember.java line 15 array2.array[51] = "500";
    What am i doing wrong?

    array cannot be accessed from outside it's block (in this case the constructor).
    just change your code this way:
    public class familymember {
      private Object[] array; // or public or protected or whatever you want
      public familymember(){
        array=new Object[500];
      public static void main(String args[]) {
        familymember array2 = new familymember();
        array2.array[51] = "500";
        System.out.println( array2.array[51]);
    }

  • Use I Pad Air with uk cellular data provider SIM card

    If I purchase a I Pad Air with Cellular and wifi.
    Will I be able to take the I pad back to uk and use with uk providers data SIM card

    Check if it has a simcard slot like this;
    http://www.laptop-junction.com/toast/content/3g-prepaid-internet-ipad-mini

  • Delete Duplicates from internal table with object references

    Hi
    How can I delete duplicates from an internal table in ABAP OO based on the value of one of the attributes?
    I have created a method, with the following code:
      LOOP AT me->business_document_lines INTO l_add_line.
        CREATE OBJECT ot_line_owner
          EXPORTING
            i_user      = l_add_line->add_line_data-line_owner
            i_busdoc = me->business_document_id.
          APPEND ot_line_owner TO e_line_owners.
      ENDLOOP.
    e_line_owners are defined as a table containing only object references.
    One of the attribute of the object in the table is called USER. And I would like to do a "delete ADJACENT DUPLICATES FROM e_line_owners", based on that attribute.
    How can do this?
    Regards,
    Morten Nielsen

    Hello Morten
    Assuming that the instance attribute is <b>public </b>you could try to use the following coding:
      SORT e_line_owners BY table_line->user.
      DELETE ADJACENT DUPLICATES FROM e_line_owners
        COMPARING table_line->user.
    However, I am not really sure (cannot test myself) whether <b>TABLE_LINE</b> can be used together with SORT and DELETE.
    Alternative solution:
      DATA:
         ld_idx    TYPE sy-tabix.
      LOOP AT e_line_owners INTO ls_line.
        ld_idx = syst-tabix + 1.
        LOOP AT e_line_owners TRANSPORTING NO FIELDS FROM ld_idx
                       WHERE ( table_line->user = ls_line->user ).
          DELETE e_line_owners INDEX syst-tabix.
        ENDLOOP.
      ENDLOOP.
    Regards
      Uwe

Maybe you are looking for

  • Switch to package EAM_EHP4_SR_SFWS_SC is off,  Message no. R8371

    Hi Expert, in ECC DEV, I'm trying to activate DataSource SAP-R/3/PM/0PM_SCH_PLND_ORDER, but got this error: DataSource 0PM_SCH_PLND_ORDER; switch to package EAM_EHP4_SR_SFWS_SC is off Message no. R8371 Please help. Thank you. Edited by: Ting Chen on

  • How to Catch Unique Constraint in Exception

    Hi, I am writing a trigger TR_EMP on a table EMP which has columns EMP_ID, EMP_NAME, ALT_EMP_ID. Now I am updating ALT_EMP_ID for an EMP_ID(PK) which is unique. If ALT_EMP_ID is null then       :new.ALT_EMP_ID = l_alt_emp_id; end if;As this ALT_EMP_I

  • How to display popup at the web interface side while checking a sh cart

    Hi Experts, I have a requirement to get the popup while checking the shopping cart.. I have implemented the badi BBP_DOC_CHECK_BADI..(Classic scenario) In this badi , i am using one RFC FM to check the item details availability in the backend..I am g

  • No Sound for videos on itunes

    My computer crashed and I have all my files, but I am not able to hear any sound when I play video on Itunes. I can hear the music files, but no video. Can anyone help with this

  • PSE7, how to download images to photo site to make album?

    I am trying to make an online photo book on Shutterfly. How do I "find" the images I want when I use their downloader? With my previous PSE3 I always had duplicates of what was in the organizer in 'Pictures', and it was easy to download from there.