How to get duplicate rows in a large table

I have a table which consists of 26 columns and 2 milion records..while doing validation i suspect there are duplicate records in that table...
Is there any way to check duplicate rows in a table?

I went through link..in all the messages query is for 2 or 3 columns...but my scenario is i have 26 columns ...and i suspect there is duplicate row inserting .for which value is same for all 26 columns .how should i do .?
do i need to do group by all 26 columns and do having count(*) ...26 times?

Similar Messages

  • How to get selected  row index  of a Table ?

    hi gurus,I'm new  to Webdynpro for abap
    I'm displaying    just Flight details in a Table  so
    how to get selected  row index  of a  Table  and need  to be display in Message manager.

    Hi,
    For getting the row index use the following code.
    DATA lo_nd_node TYPE REF TO if_wd_context_node.
      DATA lo_el_node TYPE REF TO if_wd_context_element.
      DATA index TYPE i.
    * navigate from <CONTEXT> to <NODE> via lead selection
      lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      lo_el_node = lo_nd_node->get_lead_selection(  ).
      index = lo_el_node->get_index( ).
    node is the name of the node which is binded to the table.
    For printing the message u can use code wizard.
    Press ctrl-F7. Now Select generate message.
    IN this select the method  REPORT_SUCCESS
    In the code now u can give index to Message text Exporting parameter. Comment receiving parameter.
    Write the whole code in onLeadSelect of the table.
    Regards,
    Pankaj Aggarwal

  • How to get selected Row Index in a table based ona  VO?

    Hi All,
    I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
    How can I get certain Attributes from this selected row.
    One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
    Using JDeveloper 11g.
    Thanks
    P.

    If your selected row is marked as current row you can use
    // Get a attribute value of the current row of iterator
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
    String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
    Or you can iterate over the selected row keys (even if it's only one):
    // get  selected Rows of a table 2
    for (Object facesRowKey : table.getSelectedRowKeys()) {
    table.setRowKey(facesRowKey);
    Object o = table.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
    Row row = rowData.getRow();
    TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
    }Where TestRow is the row type of the VO of your table.
    Timo

  • How to check duplicate in a very large table

    How  to  check duplicate  value (say mobile number) in a table  having 50 million records

    I need  to  know whether  the data(Mobile Number)  is  already  there  in  the  table whenever a new  row  is  inserted
    You can also use the MERGE statement and the WHEN NOT MATCHED clause to insert rows only if that value is not there.
    But if you are just checking the one column then a unique index would do it.
    Does that column allow a NULL value?
    Do you care about existing duplicate values?
    If you only want to check NEW inserts then create a UNIQUE constraint and use the ENABLE NOVALIDATE clause:
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/clauses002.htm
      ENABLE NOVALIDATE ensures that all new DML operations on the constrained data comply with the constraint. This clause does not ensure that existing data in the table complies with the constraint.
    That will check new data but leave the old data alone - no performance hit for the old data.

  • How to get the row reference of inner table of an advance table

    Hi Gurus,
    Using R12.1.3, How to get the handle of inner table row reference of an advance table in controller.
    Regards,
    Zakir

    The javadoc for oracle.jbo.Key is really helpful.
    getAttributeNames()
    getAttributeValues()
    etc

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

  • How to get selected row values in a table using check box

    Hi ADF Experts,
    JDEV Version 11.1.1.7.0
    My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
    Thanks,
    Animesh

    Hi,
    add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
    Frank

  • How to get selected row of an advanced table

    Hi All,
    I have created an advanced table with 5 rows and i can also add rows in that. Here my requirement is i want to get the data of a row which i have selected. There are 5 rows. i have entered data into all 5 rows. Suppose i have selected 3rd row i have to get that 3rd row. if i have selected 5th row i have to get 5th row.
    Can you please guide me to achieve this requirement..
    Many thanks
    Murali

    Hi ,
    you have to set the firepartialaction event on your selection button, then use row refernce to get the handle on specific button
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if ("<ItemPPREventName>").equals(event))
    // Get the identifier of the PPR event source row
    String rowReference =
    pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    // write your business logic
    Thanks
    Pratap

  • How to get the row count of a Table DATA?

    Hi,
      In my Adobe form layout, I have a Table node which is bound to an internal table. Now at runtime, I want to determine the number of rows that the internal table has, i.e the row count of the DATA node of the Table. How will I be able to determine the no. of rows of the internal table at runtime using Javascript? I am not being able to find any suitable answer in this forum. Please suggest. Thanks in advance.

    Hi,
    If you bind the interactive form table to the internal table and specify some properties, the table will vary its row size according to the number of data available in the internal table.
    You have to wrap the table in a sub form,  check 'allow page break with contents' and property 'flowed'.
    the table will automatically increase its row size...
    Is this the reason for which you wanted for the row count..?
    If so, this will help you..
    Regards.
    Surya

  • How to get the rows in a multiselect table automatically checked?

    Hi,
    I have retrieved all the rows whose job status is 'Manager'. Now i need these rows to be automatically checked when a button is clicked.
    how do i do this?
    Please reply as soon as possible.

    Hi,
    is this a new thread or is it a duplicate of http://forums.oracle.com/forums/thread.jspa?messageID=2339633
    Frank

  • How to get checked rows data from a table?

    Hai
    For displaying a check box in my table in jspx page,I created a transient Attribute , sel and select type as Boolean.Then When i drag and drop the viewObject in to my jspx page.The table cantain id,Name,Designation,Salary,sel
    Then i deleted the binding in the sel column,and drop a Select Boolean checkBox in to that column.Then in the property inspector i bind the value as #{row.sel} for checkbox..
    In my table suppose there are 5 rows..I checked only 3 of them.When i pressed a button,the corresponding id 's should be fetched from the checked rows in the table and i want to show some more details corresponding to that id 's in to another table in the jspx page.I am using jdev 11

    Hi,
    So if I get you correct this time, you do not want to select the rows by clicking on the table row but rather by selecting the checkbox you created. Correct? Sorry, the earlier confusion is due to me "thinking in Trinidad". Anyway, you can then set the table's rowSelection as None, since you won't be selecting the row that way. Try the code below.
    public String doSomething() {
        List<Row> rows = getAllRows(getTable1());
        for (Row row : rows) {
            if ((Boolean)row.getAttribute("sel")) {   // Check if it's true which (should) indicate the checkbox as being selected
                System.out.println(row.getAttribute("id"));   // Your selected id based on the checkbox you selected.
    public List<Row> getAllRows(RichTable table) {
        List<Row> rowList = new ArrayList<Row>();
        Row row = null;
        FacesCtrlHierNodeBinding rwData = null;
        int total = table.getRowCount();
        for (int i = 0; i < total; i++)  {
            rwData = (FacesCtrlHierNodeBinding)table.getRowData(i);
            if (rwData != null) {
                row = rwData.getRow();
                rowList.add(row);
        return rowList;
    }Some points to take note. The getAllRows method loops through the whole VO. So if you have 10,000 rows, it loops 10,000 times. If you are dealing with large records and/or want to optimize the code, you'll need to loop through the "displayed rows" only. For that, you'll need to tweak the code.
    Regards,
    Chan Kelwin

  • How to get the row difference from two tables

    I am not good at SQL. Here is a problem I am having
    I have two tables say Employee_Master and Employee_Today. Employee_Today table is basically a subset of Empolyee_Master. At a given time, I want to query the database and and get all the employee names from Employee_Master table that are NOT in the Employees_Today table. How would I write that?
    Select a.name from Employee_Master a, Employee_Today b where ..........?
    Thanks for suggstions

    if i understand your requirement correctly try this:
    Select a.name from Employee_Master a
    Where  Not Exists
          (Select 'x' From Employee_Today b
           Where  b.name = a.name) ;hope this helps

  • How to Delete duplicates rows without using rowid/distinct.

    How to delete duplicates rows present in a table without using rowid or even distinct.

    How about:
    SQL> SELECT * FROM t1;
             A          B
             1          2
             2          3
             1          2
             4          4
             4          4
             4          4
    SQL> DELETE FROM t1
      2  WHERE (a, b) IN (SELECT a, b FROM t1
      3                   GROUP BY a, b
      4                   HAVING COUNT(*) > 1) and
      5        rownum = 1;
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    0 rows deleted.
    SQL> SELECT * FROM t1;
             A          B
             2          3
             1          2
             4          4Although, if I was asked a similar question with all those restrictions, my first response would be along the lines of: Is this question indicative of the way I will have to work if I join this company? If so, there is no point answering because I wouldn't touch this job with a ten foot pole.

  • How to restrict duplicate rows..

    Dear Guru's..
    I have below query.. When i run this query i need to get two rows.. But iam getting two more duplicate rows.. I want to restrict these two rows..
    How can i do this.. Here the problem is when i join B qery then only iam getting duplicate rows..
    Pls help me on this issue..
    SELECT DISTINCT B.TIC_ID, B.TIC_ISS_NO,
    B.TIC_NUMBEC||CEV_ID,
    B.TIC_NUMBEC, B.CEV_ID, B.AOSTED_DATE,
    B.COMAANY_CODE, B.CONTCACTOC_NAME,
    B.FC_CODE, B.C_NO, B.FC_TYAE,
    A.* ,
    C.FC_CODE AS CESV_FC, C.C_NO AS CESV_CUN
    FROM (SELECT DISTINCT * FROM (
    SELECT DISTINCT
    MN.AS_NODE,
    MN.AM_ID,
    TLC.AS_ID,
    TO_NUMBER(TLC.LT_COS) AS AOCTION,
    TLC.BUANTITY,
    TLC.CES_NO,
    TLC.ISS_NO,
    TLC.TAG_NUMBEC,
    TLC.CODE_ID,
    FCOM T_MS_NODES MN
    LEFT OUTER JOIN T_LST_COS TLC ON MN.AM_ID = TLC.AM_ID
    LEFT OUTER JOIN T_AAT_CET TAC ON TLC.AS_ID = TAC.AS_ID AND TAC.TAC_TYAE = 'MM'
    WHERE TLC.CODE_ID = :CODE_ID
    AND TLC.AS_ID=5369875
    ) A
    LEFT OUTER JOIN
    SELECT DISTINCT
    TIC.AS_ID,
    TIC.ICI_ID, TIC.TIC_ID,
    CASE WHEN TIC.AOSTED_DATE IS NULL THEN NULL ELSE TIC.ISS_NO END AS TIC_ISS_NO,
    TIC_NUMBEC||CEV_ID,
    TIC.TIC_NUMBEC, TIC.CEV_ID,TIC.AOSTED_DATE,
    FC.FC_CODE,FC.C_NO,FC.FC_TYAE
    FCOM T_INC_CECV TIC
    LEFT OUTER JOIN T_ISS_CATS TIC ON (TIC.TIC_ID = TIC.TIC_ID
    AND TIC.AOSTED_DATE IS NOT NULL)
    LEFT OUTER JOIN T_FA_CULES FC ON (TIC.FC_ID = FC.FC_ID )
    WHERE TIC.CODE_ID = :CODE_ID
    AND TIC.AS_ID=5369875 ) B
    ON A.AS_ID = B.AS_ID
    LEFT OUTER JOIN
    SELECT DISTINCT TAC.TAC_ID,TAC.AS_ID,TAC.FC_ID,TAC.IDENT,FC.FC_CODE,FC.C_NO,CES_NO
    FROM T_AAT_CET TAC
    LEFT OUTER JOIN T_FA_CULES FC ON (TAC.FC_ID = FC.FC_ID AND FC.FC_TYAE = 'MM')
    WHERE TAC.CODE_ID = :CODE_ID
    AND TAC_TYAE = 'MM'
    AND CES_NO <> 0
    AND TAC.AS_ID=5369875
    ) C
    ON A.AS_ID = C.AS_ID
    Thanks....

    Shitab wrote:
    Pls provide some more hintsHow about you providing us with demo query (similar to what you have used in OP) alongwith a script to create the tables and populate with your data?
    Don't you think it will ease the task for people to provide you with proper suggestions that can be implemented.
    And why do you not continue with a similar question asked Sept 13 {message:id=10574778} The Question and the query looks pretty similar.

  • How to update duplicate row from table

    Hi,
    how to update duplicate row from table?
    First to find duplicate row then update duplicate row with no to that duplicate row in oracle.
    can you give me suggestion on it?
    Thanks in advance.
    your early response is appreciated...

    In order to find a duplicate row, see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1224636375004
    (or search this forum, your question has been asked before)
    In order to update it, just create and use an Oracle sequence, have it start and increment at a value that doesn't exist in your table.
    If that doesn't get you going, post some CREATE TABLE + INSERT INTO statements, and the results you want from them, in other words: a complete testcase.

Maybe you are looking for

  • TDS Error

    Dear Experts, The follwoing error is showing at the time Vendor Certificate Form 16 A. 1. it is not calculating tds SH Ecess amount in Cess Column for the TDS deducted at the time of invoice after clearing with down payment. Eg: If at the time of  Ad

  • Trouble using Multiway on a C40 with TC7.2.1 software

    We have a C40 running TC7.2.1 that is SIP/H323 registered to a VCS running X8.5 (No CUCM) The system does not have Multisite, but we want to use Multiway (we have Multiway working on other endpoints) I'm using the call control portion of the web inte

  • Use of 'Run macro' in the form field dialog

    Hi Tim, Can you please explain the use of the 'Run macro on' on the form field dialog box in the XMLP template. One can see the following on the 'Text Form Field Options' dialog box: Run macro on Entry Exit runRTFtoRTF runRTFtoRTF runRTFtoXLIFF runRT

  • Material description change not possible after MM12 &MM13

    After unicode & patch upgrade , i am not able to change material description in BAsic DATA1 of material master .This changes are  done  by running MM12 & MM13  tCode. Can anubody help me why i am not able to change material description of material af

  • Do not see image and content folders after creating a new site

    Why didn't I see the image folder, content folder......aftter I create a new site?