This discussion is archived
7 Replies Latest reply: Feb 19, 2013 9:30 PM by 864103 RSS

find duplicate 11g

864103 Newbie
Currently Being Moderated
Hi all ,

i want to find the duplicate data in my tables i have the below structure
SQL> desc x;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 FILE_CODE                                          NUMBER(20)
 STREAMNUMBER                                       VARCHAR2(50)
 SERVICEKEY                                         VARCHAR2(50)
 CALLINGPARTYNUMBER                                 VARCHAR2(50)
 CALLEDPARTYNUMBER                                  VARCHAR2(50)
 CHARGEPARTYINDICATOR                               VARCHAR2(50)
 CHARGETYPE                                         VARCHAR2(50)
 ROAMFLAG                                           VARCHAR2(50)
 ROAMAREANUMBER                                     VARCHAR2(50)
 SCPID                                              VARCHAR2(50)
 MSCADDRESS                                         VARCHAR2(50)
 MSCID                                              VARCHAR2(50)
 LAI                                                VARCHAR2(50)
 CELLID                                             VARCHAR2(50)
 MIN                                                VARCHAR2(50)
 CALLSTARTTIME                                      DATE
 CALLSTOPTIME                                       DATE
 CALLDURATION                                       VARCHAR2(50)
 CALLCOST                                           VARCHAR2(50)
 MOBILECOST                                         VARCHAR2(50)
 ROAMCOST                                           VARCHAR2(50)
 TOLLCOST                                           VARCHAR2(50)
 EXTRACOST                                          VARCHAR2(50)
 CALLINGVPLMN                                       VARCHAR2(50)
 CALLINGHPLMN                                       VARCHAR2(50)
 CALLEDVPLMN                                        VARCHAR2(50)
 CALLEDHPLMN                                        VARCHAR2(50)
 CALLINGVPROVNO                                     VARCHAR2(50)
 CALLINGHPROVNO                                     VARCHAR2(50)
 CALLEDVPROVNO                                      VARCHAR2(50)
 CALLEDHPROVNO                                      VARCHAR2(50)
 CHARGERULE                                         VARCHAR2(50)
 USERTYPE                                           VARCHAR2(50)
 CALLMODE                                           VARCHAR2(50)
 TAX                                                VARCHAR2(50)
 BALANCEBEFORECALL                                  VARCHAR2(50)
 EXTROAMFEE                                         VARCHAR2(50)
 COLLECTCALLFEE                                     VARCHAR2(50)
 CARRIERCODE                                        VARCHAR2(50)
 ACCOUNTID                                          VARCHAR2(50)
 ACCOUNTTYPE                                        VARCHAR2(50)
 CHARGPARTYNUMBE                                    VARCHAR2(50)
 CALLTYPE                                           VARCHAR2(50)
 CHARGETYPE2                                        VARCHAR2(50)
 ROAMFLAG2                                          VARCHAR2(50)
 TALKTYPE                                           VARCHAR2(50)
 IVRCHARGETYPE                                      VARCHAR2(50)
 BONUSBALANCEBEFORE                                 VARCHAR2(20)
 BONUSCOST                                          VARCHAR2(20)
 SEQ_NO                                             NUMBER(20)
i found the below query it's right
SELECT * x
         WHERE ROWID NOT IN (SELECT MIN(ROWID) FROM x
                                               GROUP by FILE_CODE,..........................,SEQ_NO ); all the column 
thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points