Identifying like rows across tables in a less brute force way.

I have 2 tables. Neither table has a meaningful unique key as they are. I want to create another table by selecting from the 2 tables where all of the fields are the same. I also want to consider null-null to be a match as well as value-null and null-value to be a match for each field.
What i've done is write a function that compares the values and returns a 0 or 1 based on the rules
value, value -> 1
null,null -> 1
value, null -> 1
null, value -> 1
value, different value -> 0
i then call the function during my insert
A simple version would be
insert into Target_Table( Select T1.x,T1.y,T1.z from T1,T2 where
Func(T1.x,T2.x) = 1 and
Func(T1.y,T2.y) = 1 and
Func(T1.z,T2.z) = 1)
It seems to work but only with small data. I believe that i am basically comparing one row to the entire other table behind the scenes. Obviously this breaks down even when the tables are over a few thousand rows.

No. The 2 tables actuially contain mostly the same data but are from 2 different dates. What i'm trying to do is assign a unique key to each record in the results table. After that i'll use it as my "old" table going forward and always take the key from it and assign new keys to any records that show up in the "new" data.
The problem is that some of the fields might get populated between the time each table is created. There is also a possability that they may change, which breaks my method but i'll jump over that hurdle when i get there.

Similar Messages

  • How to identify current row in table from selectOneChoice compact mode

    Hi,
    I have an af:table in which one of the columns is selectOneChoice in compact mode.  Upon selecting item in this selectOneChoice, valueChangeListener is triggered and do some work based on that row.  However, my issue is that it's hard to identify the current row since the selectOneChoice is in compact mode.  If the selectOneChoice is not in compact mode, when user selects item in selectOnechoice, selectionListener of af:table is triggered to identify the current row.  But if selectOneChoice is in compact mode, user is able to select from selectOneChoice and valueChangeListener is triggered before selectionListener of af:table is triggered.  Hence, not able to identify current row. 
    As a not so ideal workaround, I tried to put the row identifier (in my case, it's DetailSeq) in shortDesc, and get it from there.  But users is complaining seeing this not user friendly in shortDesc/hintText.  I tried to put DetailSeq as the id of the selectOneChoice, but it didn't work (Cannot get Id of selectOneChoice in table)
    <af:table>
      <af:column headerText="Action" id="c5" width="30">
            <af:selectOneChoice id="a${row.DetailSeq}" autoSubmit="true" valueChangeListener="#{viewScope.backing_requestOverview.onSelectAction}" label="Action" mode="compact" shortDesc="#{row.DetailSeq}">
                <f:selectItems value="#{backing_requestOverview.requestActionsMap[row.StatusUid]}" id="si333"/>
                </af:selectOneChoice>
        </af:column>
    </af:table>
    In the valueChangeListener:
      public void onSelectAction(ValueChangeEvent valueChangeEvent) {
    RichSelectOneChoice actionChoice = (RichSelectOneChoice)valueChangeEvent.getComponent();
    LOGGER.info("Short Desc: " + actionChoice.getShortDesc());
            LOGGER.info("Component Id: " + actionChoice.getId());
    Any advice?
    Thanks
    -Mina

    Hi,
    what about using an f:attribute tag to add the "DetailSeq" to the component. Should work similar to the shortDesc but is invisible. You can then get this attribute value by its name among the component attributes
    Frank

  • 1 million row full table scan in less than one minute?

    All,
    a customer has a table which is around 1 million rows.
    The table size is 300 Mo.
    The customer wants to calculate regular arithmetic operations,
    and synthetic data on the whole table. He will use 'group by'
    statements and 'sort by'.
    He wants to know if it would be possible to get the results in
    less than one minute, and what would be the necessary
    architecture in order to achieve this?
    He currently has a 4 Gb Ram machine, 4 processors (I think...).
    It's a 7.3 database.
    Would an upgrade to 8i or 9i help? Would partitioning help?
    Would parallel query help? What else?
    There will be no other concurrent requests on the system.
    Thanks!

    Hi
    If you have four processors parallel query will increase speed
    of executing your statement. It will work better with
    partitions. In version 7.3 is not very easy to manage partitons
    because you have not partition tables - you have only partition
    views. Maybe the speed is the same but management of partition
    views is not so easy. So in version 8i and 9i it will be better.
    If you have index for group by columns and they are 'NOT NULL'
    it will be additional way of increasing speed beacause you will
    eleminate sort operation.
    Regards

  • How to count number of rows in table

    can I get number of row in table except Count(*) in pl/sql
    is there any other way

    Also posted and answered here
    how to count number of rows in table
    count(*) will be the fastest way. It is only slow if the table has a vast number of rows, in which case why do you need to know the tables has 73552436467721 rows and not 73552436467737 rows. It doesn't seem to be much use. Either that or you are counting them a lot, which again seems rather pointless.

  • Break table row across multiple frames?

    Hi
    I would know wether is possible to split a single table row across serverla frames/pages.
    I´m using InDesign CS5 and when I try to import a big table from word documments (by using de app or by scripting), if a row is bigger than the textFrame, a blank page is generated with the overflow simbol.
    The only way to see that table is by enlarging the textFrame.
    I´ve been reading about this problem, and some news in 2004 reported it was a problem wich will be solved in next releases.
    Is there any way to work arround?
    One option is to split de row in several small rows, but I think the proper solution would be to let the row jump to the next TextFrame (just like word does)
    Thanks in advance

    I can show you a real example.
    http://www.xunta.es/dog/Publicados/2011/20110615/AnuncioC3F1-140611-3147_gl.pdf
    In page 14984 the row with the text "Coruña" span across two pages. Well, in this example, what we did was to convert the table in images. Then the images were put inside each page in InDesign.
    This cell is too big to fit in a frameText and it was shown as empty.
    Other option would be to split the row before the imporation. In this way, InDesign would, automatically jump to the next page.
    The question was if there was any configuration option to implement all this solutions (change the table or convert it to text) without change the table structure.
    Any way, thansk again.

  • Flowing table rows across pages

    Is there a way that when using tables you can flow rows across pages automatically like you can in MS word?
    Thanks

    ID splits tables only between cells rows, not mid-row, but it will certainly split a table between frames.

  • How to identify migrated rows on a table

    Hi, folks,
    I'm wondering how to identify migrated rows on a table.
    I understand that ANALYZE generates data into CHAINED_ROWS. The Oracle document implies that this table has both CHAINED ROWS and MIGRATED ROWS. FYI:
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/general.htm#sthref1881
    But how can I tell migrated rows from chained rows.
    Thanks!
    Alex

    im also not looking to ExporttoExcel feature on ADF just copy all the records displayed on a table
    im also not looking to ExporttoExcel feature on ADF just copy all the records displayed on a table ,
    Hi you can set the property( exportedRows) of exportListener
    you can limit the number of rows to download
    chekout documentaion
    ADF RichClient API - af:exportCollectionActionListener

  • TablePopin: Identifying the row where an action of a popin occured

    Hi,
    i want to use the TablePopin UI-element. The popin can be opened for more than one row at the same time. In the popin some actions might occur (like actions of buttons etc.) My problem is how to identify the row where the action occured. I saw a solution in the wiki using some modifcation of the actions ( https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/how%2bto%2bimplement%2btablepopin ). It works quite good. However, it will become a pain if you have not only one table but various tables with popin-elements and if you have not only one action but various actions. So, i wonder if there is any easier way to identify the specific row an action occured.

    hi
    please go through this link
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/how%2bto%2bimplement%2btablepopin
    Regards
    Ruturaj

  • How do I deselect a row in table control on scrren?

    Hello All:
         How do I write the code to deselect a row in table control on a screen? This is in dialog programming.
    Thanks.
    Mithun

    I thought that the descriptions given in the Help are clear.
    The ADDRESS function constructs a cell address string from separate row, column, and table identifiers.
    ADDRESS(row, column, [type], [style], [table])
    row: The row number of the address.
    column: The column number of the address.
    I dropped the comments about type, style and table as I don't use them here.
    =IF(ISBLANK(INDIRECT(ADDRESS(ROW(),1))),"",INDIRECT(ADDRESS(ROW(),2))*INDIRECT(A DDRESS(ROW(),3)))
    INDIRECT(ADDRESS(ROW(),1))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 1st one)
    INDIRECT(ADDRESS(ROW(),2))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 2nd one)
    INDIRECT(ADDRESS(ROW(),3))
    returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 3rd one)
    In short, when the formula is applied in row 9 it behaves like:
    =IF(ISBLANK(A9),"",B9*C9)
    The long syntax is required to be able to enter it only once in the header cell as described in the Help and in the PDF User Guide in a chapter entitled "Applying a Formula Once to Cells in a Column or Row".
    As we want to use such a formula, it would be odd to destroy its ability using a different formula in a standard bottom row.
    More, in a footer row, we may use shorter formulas than in other rows.
    In a standard row 10 we would have to write =SUM(D2:D9)
    in a footer row we enter only =SUM(D) which add the contents of every standard cells of the column D.
    This feature is also described in the named resources.
    Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:21:13)

  • ABAP / Query to Identify Duplicate Rows in Cube

    Dear Experts,
    We have a situation were some of our Cubes (due to compression and varying levels of forceful reloads) now contain duplicate rows.
    What I need to know is :-
    1) Is there a way to identify duplicate rows where one of the characteristics are different but all key figures are identical.
    2) If so what is easier to achieve, ABAP routine/program or Query
    3) If ABAP suggestions on how to code such
    4) If query same.
    What I need it to do is tell me which ClaimNo record (Primary Key) has duplicates and what characteristic has caused it.
    I know I am asking for a lot but I really need to get this resolved as it's causing mayhem and trying to pinpoint these records is both time consuming and painful.  What we are looking to do with the records is establish how they became duplicated so we can prevent this happening in the future.
    Your help as always much appreciated.
    Regards
    Craig
    Message was edited by: Craig Armstead

    Hi Craig,
    My previous answer can find out what all cubes and data targets have been loaded based on a request.
    Actually for your query. The following information will be surely useful.
    tables: /BIC/**(source ) , /BIC**(target)
    parameter : fieldname like /BIC/****-fieldname ( In ur case the it can be primary key or Duplicate entry )
    data: itab_source  like /BIC/*** occurs 0 with header line,
          itab_destination like /BIC/*** occurs 0 with header line.
    data: wa_itab_destination like line of itab_destination.
    select *
      from /BIC/*****
      into corresponding fields of table itab_source.
      where fieldname = fieldname.
    ******Include your piece of code which is for deleting records
    Delete adjacent duplicates from itab_source comparing characteristic ( i.e  duplicate characteristic you specified)
    ****Use this to delete the ODS Data before writing into it
    call function 'RSDRI_ODSO_DELETE_RFC'
      exporting
        i_odsobject  = 'ODS Name'
        i_delete_all = 'X'.
    if sy-subrc = 0.
      loop at itab_source.
        move-corresponding itab_source to itab_destination.
        append itab_destination.
      endloop.
      modify /BIC/*** from table itab_destination[].   “target being written from itab.
      commit work.
    endif.
    Please Reward points if this helps really.
    Thanks,
    Srinivas.

  • Restrict number of rows in table view

    Can a table view has only as many rows as the actual rows in the underlying data structure. Actually, I have a table view with less than 5 rows, but the tableview shows like 15+ rows with the rest of the rows as blank(alternative colors for each empty rows). I know there is a style which can be applied to make the remaining empty rows show with white background. However, the height of the table view doesn't reduce to show only the actual number of rows. Is there a way we can restrict the height of the table view to the height of actual rows it has?
    Thanks.

    Hi. Add a listener to your data. Use prefheight to restrict the table height:
            table.setPrefHeight(data.size() * 25 + 25);  
            data.addListener(new ListChangeListener<Person> ()  {
                public void onChanged(ListChangeListener.Change<? extends Person> c) {
                   table.setPrefHeight(data.size() * 25 + 25);
            });It works only when data.size() * 25 + 25 < scene.height

  • How to get all the index of "selected rows" in table control?

    Hi Gurus,
    I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
    I know that the event for capturing selected row is in PAI.
    I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
    TOP INCLUDE
    YPES: BEGIN OF Y_ZQID_CHECK,
            IDNUM           TYPE ZQID_CHECK-IDNUM,
            WERKS           TYPE ZQID_CHECK-WERKS,
            MATNR           TYPE ZQID_CHECK-MATNR,
            LICHA           TYPE ZQID_CHECK-LICHA,
            LIFNR           TYPE ZQID_CHECK-LIFNR,
            ECOA_S          TYPE ZQID_CHECK-ECOA_S,
            ID_STAT         TYPE ZQID_CHECK-ID_STAT,
            ID_DATE         TYPE ZQID_CHECK-ID_DATE,
            FLAG_MAILCOA(1) TYPE C,
            MARK(1)         TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
           END   OF Y_ZQID_CHECK.
    DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
    PAI
    PROCESS AFTER INPUT.
    * MODULE USER_COMMAND_9004.
    LOOP AT T_ZQIDCHECK_DISCH.
      MODULE READ_TC_DISCH .
    ENDLOOP.
    module READ_TC_DISCH input.
      DATA: W_LINE_SEL TYPE SY-STEPL,
                  W_TABIX    LIKE SY-TABIX.
      GET CURSOR LINE W_LINE_SEL.
      W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
      MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
    If I am selecting single row, I can properly get the selected index via debug.
    BUG:
    When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
    Please see the screenshot.
    [url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
    Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
    Helpful inputs will be appreciated.
    Thanks.
    Jaime
    Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PM

    Hi,
    Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
    Flowlogic.
    LOOP WITH CONTROL TC_01.
         Module Get_Marked.
    ENDLOOP.
    Module Pool
    Module Get_Marked.
    read the data from the internal table where mark  = 'X'.
    this should give you only selected records.
    Endmodule.
    Kindly check the tablecontrol property.
    Regards,
    Ranjith Nambiar

  • How to add the Row count(number of rows in table)  in  the table header?

    Hi,
    I'm having a table. This table is viewed when i click on a search button.
    <b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
    How to do this? could any one explain me with the detailed procedure to achieve this.
    Thanks & Regards,
    Suresh

    If you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
    Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
    Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
    int numRows = wdContext.node<TableDataSourceNode>().size();
    String text = wdComponentAPI.getTextAccessor().getText
      IMessage<ComponentName>.TABLE_HEADER_TEXT,
      new Object[] { String.valueOf(numRows) }
    wdContext.currentContextElement().setTableHeaderText(text);
    Maybe you want to provide a separate message for the case that there are no entries.
    Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
    Armin

  • . How to put Check box in every row in Table

    Hi Friends,
    I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
    Here Select Check Box of particular row then click GetData button.  That row data will be displayed in one popup window.
    In table suppose 6 rows available in table. Every Row first Check box available.
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name 
    How to put Check box in every row in Table?  can you send any examples applications
    Regards
    Vijay

    Hi Friend,
    When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
    attribute.
    So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
    next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
    Okay...here i am getting one problem. i have got Check boxes .But i am select check box in  first row. that time all check boxes will be selected.
    i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
    i need this can u help me....
    Regards
    Vijay

  • How to Hide Row in table view depend on condition

    Dear Friends,
    Please any one suggest how to do hide some rows in table depend on condtions.
    My Issue is :
    I have table with binding componant context controller, with in that some rows are no need to disply in my table, I tried to delete that entities from collection wrapper in do_prepare_output. but that entites are perminatly deleted from model node.
    how can achive this with out delete entities from model node and hide some rows in table view.
    thanks & Regards

    Hi Andrew,
    Please can you explain alobrate, because i wont' found that method in my implimentation and it's table config like follow
    <% IF attr->check_consistency( ) eq abap_true. %>
        <chtmlb:configTable  xml="<%= lv_xml %>"
                             id="TextList"
                             navigationMode="BYPAGE"
                             onRowSelection="select"
                             table="//Text/Table"
                             width="100%"
                             selectedRowIndex="<%=Text->SELECTED_INDEX%>"
                             selectedRowIndexTable="<%=Text->SELECTION_TAB%>"
                             selectionMode="<%=Text->SELECTION_MODE%>"
                             usage="ASSIGNMENTBLOCK"
                             visibleRowCount="3"/>
      <% ENDIF. %>
    thanks & Regards
    Ganesh

Maybe you are looking for

  • Capture settings for Sony HDR-FX1 in FCP 5.0.4

    I just got a new sony HDV camera (HDR-FX1). I shot some footage around the office and want to bring it into FCP to practice edits. I have only used DV in the past so what settings do i use for capture and project. There are several presets and i am n

  • Windows 8.1 SMB1 Not Working

    We have software that is written in visual foxpro and some of our clients have been getting corrupted index's and missing records and from past experiences we've found that OPLOCKS is the cause of these issues.  To test if this is really is the issue

  • SQL Loader Direct Path and Nulls

    I'm using Sql Loader with Direct Path and I cannot find a way to remove trailing spaces in varchar2 fields. I'm trying to avoid updating the tables after loading. Any ideas?

  • 24bit PNG font weight issue

    Hi all, I have a problem which I can't seem to find any record of anyone else having in these forums, yet I can replicate it no matter which machine I go on in our creative agency using CS5. It's thus: I have a page of content laid out the way I want

  • When I try to download OS X Lion my Macbook says that I need at least 2 GB of memory even though I already have it

    My MacBook says I have 17.41 GB available but the Mac App Store will not let me dowload OS X Lion. It says "We could not complete your purchase. Mac OS X 10.7 requires at least 2 GB of memory." What does this mean? This is confusing me.