Finding the duplicates

Hi,
I am having a entire road network of NA in Oracle Spatial as SDO geometry. I used to connect this db using arcmap through arcsde. When I use the Identity tool on Interstates, I am getting 3 records as output.
I tried to use SDO_NN_DISTANCE(1) with a distance of 200 feet. I am getting two or three rows, SDO_NN_DISTANCE(1) as dist provides the same distance for two or three rows. Each row represents the same road segment with their alternative names.
How to find the duplicates in Oracle Spatial.
Thanks
Vadivelan. P

Hi Vadivelan,
Identifying duplicate geometries is a common requirement in Oracle Spatial. Rather than repeat previous advice given on this forum, I think its best to point you in the direction of the search results:
http://forums.oracle.com/forums/search.jspa?threadID=&q=duplicates&objID=f76&dateRange=all&userID=&numResults=15&rankBy=10001
Regards,
John

Similar Messages

  • How to find the duplicate in the table

    i have a table with the 3 columns
    table name - employee
    empcode firstname lastname
    123 xyz pk
    456 yzz pk
    101 kkk jk
    ALTER TABLE employee
    ADD (CONSTRAINT employee_PK PRIMARY KEY
    (empcode , firstname , lastname))
    all the three columns make as porimary key, we are migrating the data there are issues with the data as the cobination of all the three resulting in duplicate, the last column is expected to have the duplicates but first two columns will not have the duplicate and one full row in the table (combintation will not have duplicates)
    need a query find the duplicates for the full row validation

    Assuming that there may be other columns in the table;
    with t as (
      select 123 empcode, 'xyz' firstname, 'pk' lastname, 10 col4 from dual union all
      select 456, 'yzz', 'pk', 20 from dual union all
      select 456, 'yzz', 'pk', 30 from dual union all
      select 101, 'kkk', 'jk', 40 from dual)
    select empcode, firstname, lastname, col4
    from (select t.*,
                 count(*) over(partition by empcode, firstname, lastname) num_rows
          from t)
    where num_rows > 1;
       EMPCODE FIRSTNAME LASTNAME       COL4
           456 yzz       pk               30
           456 yzz       pk               20

  • How to write the query to find the duplicate rows?

    Hi,
    How will I find the duplicate rows in the table?
    I have a table called ITEM
    Select item_no,mfg_id from item
    Item Mfg_ID
    178 06278
    178 06589
    238 5489
    289 7895
    289 7596
    Now I want to find only the duplicate rows i.e.,178 & 289 is coming twice.
    How will get the all duplicate rows in the table?

    nihar2 wrote:
    Convert to
    SELECT it.item,
         im.mfg_item,
         im.manufacturer,
         im.description
    FROM (SELECT it.item,
         im.mfg_item,
         im.manufacturer,
         im.description,
         count(it.item) over(partition by it.item order by it.item) cnt
         FROM item it,item_mfg im
         WHERE it.u##item=im.u##item)
    WHERE cnt > 1
    But I tried It show not valid identifier.You can't use the table aliases from the sub-query...
    SELECT item,
           mfg_item,
           manufacturer,
           description 
    FROM (SELECT it.item,
           im.mfg_item,
           im.manufacturer,
           im.description,
           count(it.item) over(partition by it.item order by it.item) cnt
      FROM item it,item_mfg im
      WHERE it.u##item=im.u##item)
    WHERE cnt > 1

  • Regarding find the duplicates using match transformation

    Hi ,
    I want to find the duplicates on mutiple fields , how can i pass i the input  to match transformation. I gave the input by mergeing the input fields and pass it as input. with out concatenating any alternative way to give input to the match transformation and find the duplicates.
    Thanks & Regards,
    Ramana.

    Hi Sarthak,
    Thanks for your response. I am not finding the cross field duplicates.  I want to find the duplicates on multiple fileds not across the fields.
    E.g. :   take customer data
      CUSTOMER NO      CUSTNAME     STREET     CITY     COUNTRY     POBOX     ZIPCODE     TELEPHONE
    1000     C.E.B. BERLIN     Kolping Str. 15     Berlin     DE               06894/55501-0
    1001     C.E.B. BERLI     Kolping Str. 15     Berlin     DE               06894/55501-0
    1002     C.E.B. BERLIN     Kolping Str.      Berlin     DE               06894/55501-0
    1003     C.E.B. BERLIN     Kolping Str. 15     Berli     DE               06894/55501-0
    Here we have 4 records are potential duplicates because  in the second record customer name  last character N missing , in the 3rd record street missing the street number and in the 4th record city missing the last character n.  if we concatenate and find the duplicates means we will get it as duplicates. Without concatenating any possibilities are there finding the duplicates for this type of data.
    Thanks in Advance.
    Regards,
    Ramana.

  • To find the duplicate record in internal table

    Hi,
    i have a requirement to fine the duplicate record with 3 fields.
    i am getting a flat file with 15 fields  .
    i need to check the duplaicate records of  3 fields . if i get any 2nd same record of 3 fields , the records will go to other internal table.
    for ex :
    1. aaa  bbb ccc ddd  eee  fff  ggg   hhh
    2. aaa  bbb ccf  dde edd  ffg ggh   hhj
    3. aaa  bbb cce ddd  ees ffh  ggu  hhk
    in that 1st record and 3rd record are same (aaa bbb ddd)
    i need to find 3rd record
    please help me
    regrards
    srinivasu

    hi,
    itab2[] = itab1[].
    sort itab1 by f1 f2 f3.
    sort itab2 by f1 f2 f3.
    delete itab2 index 1.   "to delete the first record in itab2.
    loop at itab1 into ws_itab1.
      loop at itab2 into ws_itab2.
       if ws_itab1-f1 = ws_itab2-f1 and
         ws_itab1-f2 = ws_itab2-f2 and
        ws_itab1-f3 = ws_itab2-f3.
         ws_itab3 = ws_itab2.
         append ws_itab3 into itab3.   "Third internal table.
       endif.
    endloop.
    delete itab2 index 1.   
    endloop.
    ITAB3 will have all the duplicate records.
    Regards,
    Subramanian

  • Find the duplicate meterial no

    hi all
    i have an issue
    we have loaded master data 0material to 2 info objects and 1 cube so user found some duplicate meterial no in data
    so how to find these duplicate meterial no .
    is it posible to create infoset and join both the objects

    Hi Venkatesh
    That issue got resolved Thanks for your quick response.
    I have one more issue.
    0 material master object  loading the data into info cubeZRREUC16 and infoobjecZEPMPRODt. user found some duplicate records in the data.
    She requested to create a report to trace that duplicate records on infocube and infoobject. that scenario have created a multi provider and insert the cube and info object. In query level i took one common field material  and  i have  aplied the formula . but its not working  .She wants see only invalid materials in query out put screen
    Can you please suggest me how to create a query to tracing the material duplicate records.

  • Problem in finding the Duplicate as well as Non-Duplicate count

    Hi,
    I have a scenario where I have a table TABLEA which has 3 values
    10 ABC
    10 ABC
    20 DEF
    I want to pick up the duplicate count as wel as non duplicate count:
    I have used the following query:
    SELECT COUNT(*) FROM TABLEA A WHERE A.ROWID > ANY (
    SELECT B.ROWID FROM TABLEA B WHERE
    A.CODE=B.CODE)
    But I am finding problem in getting the non-duplicate count .
    Any help will be needful for me
    Edited by: user598986 on Sep 23, 2009 11:32 PM

    user598986 wrote:
    Hi,
    I have a scenario where I have a table TABLEA which has 3 values
    10 ABC
    10 ABC
    20 DEF
    I want to pick up the duplicate count as wel as non duplicate count:
    I have used the following query:
    SELECT COUNT(*) FROM TABLEA A WHERE A.ROWID > ANY (
    SELECT B.ROWID FROM TABLEA B WHERE
    A.CODE=B.CODE)
    But I am finding problem in getting the non-duplicate count .
    Any help will be needful for me
    Edited by: user598986 on Sep 23, 2009 11:32 PMHi,
    perhaps this query makes your job:
    HR: XE > select * from test_;
    NAME           SALARY HIRE_DATE START_DAT END_DATE
                          15-SEP-09 15-SEP-09
                          15-SEP-09 01-DEC-09
    john                  27-AUG-09 16-SEP-09 16-SEP-10
                          28-FEB-09 20-SEP-09
    Dave                2 17-JUN-08 16-SEP-09 02-JUL-11
                     1000 21-AUG-82 08-MAY-10
    6 rows selected.
    HR: XE > select count(hire_date), hire_date from test_
      2  group by hire_date;
    COUNT(HIRE_DATE) HIRE_DATE
                   1 27-AUG-09
                   1 21-AUG-82
                   2 15-SEP-09
                   1 28-FEB-09
                   1 17-JUN-08
    HR: XE > select count(id), id from
      2  (
      3  select hire_date, 'simple' id from test_
      4  minus
      5  select test_.hire_date, 'simple' id
      6  from test_
      7  where test_.hire_date In (Select hire_date FROM test_  GROUP BY hire_date HAVING Count(*)>1 )
      8  union all
      9  select test_.hire_date, 'double' id
    10  from test_
    11  where test_.hire_date In (Select hire_date FROM test_  GROUP BY hire_date HAVING Count(*)>1 )
    12  )
    13  group by id;
    COUNT(ID) ID
             2 double
             4 simple
    HR: XE > Regards,
    Ion

  • How to find the duplicate modifiers against the same SKU

    Hi Gurus,
    how to find he duplicate modifiers existing against the same SKU.
    Any help or advise is helpful..
    Thanks
    Yasar

    here is an example that might be of help.
    SQL> select * from employees;
    YEAR EM NAME       PO
    2001 02 Scott      91
    2001 02 Scott      01
    2001 02 Scott      07
    2001 03 Tom        81
    2001 03 Tom        84
    2001 03 Tom        87
    6 rows selected.
    SQL> select year, empcode, name, position,
      2         row_number() over (partition by year, empcode, name
      3                            order by year, empcode, name, position) as rn
      4    from employees;
    YEAR EM NAME       PO         RN
    2001 02 Scott      01          1
    2001 02 Scott      07          2
    2001 02 Scott      91          3
    2001 03 Tom        81          1
    2001 03 Tom        84          2
    2001 03 Tom        87          3
    6 rows selected.
    SQL> Select year, empcode, name, position
      2    From (Select year, empcode, name, position,
      3                 row_number() over (partition by year, empcode, name
      4                                    order by year, empcode, name, position) as rn
      5            From employees) emp
      6   Where rn = 1;
    YEAR EM NAME       PO
    2001 02 Scott      01
    2001 03 Tom        81
    SQL>

  • HELP!!!! Can't find the duplicates

    I just came back from the second trip to the Apple "Genius" Bar.
    I had the pictures in iPhoto all over the place.
    Apparently the "Genius" made a new iPhoto folder and I was placing all the good ones into that folder and Trashing( I say trashing, as it doesn't delete them like a PC does) the rest/
    Now I have a 150 GB computer filled with 80GB of the same 9,000 pictures.
    The computer is maxed out and useless with 1,000's upon 1,000's of the same photos!!!
    Where does one find all the duplicates?
    Trashing the pictures does not free up space. It doesn't!!!!!!!!!!!!!
    Somewhere the computer is keeping copies of the not-so Trashed pictures!!!!!
    Where can I find that? PC keep better track of that stuff.
    Thanks,
    Mike

    I just came back from the second trip to the Apple "Genius" Bar.
    I had the pictures in iPhoto all over the place.
    You need to explain this. iPhoto very carefully by default keeps all of the photos in the iPhoto library and if you do not go in and mess with things iPhoto will always know where they all are.
    Apparently the "Genius" made a new iPhoto folder and I was placing all the good ones into that folder and Trashing( I say trashing, as it doesn't delete them like a PC does) the rest/
    Again please explain - did they import the photos into iPhoto? just put them in a folder named iPhoto (a strange and unusual thing to do but certainly possible)? what?
    Now I have a 150 GB computer filled with 80GB of the same 9,000 pictures.
    The computer is maxed out and useless with 1,000's upon 1,000's of the same photos!!!
    This makes no sense at all -- how did thousands upon thousands of duplicates get made of the same photos?
    Where does one find all the duplicates?
    As notes above - more information is needed
    Trashing the pictures does not free up space. It doesn't!!!!!!!!!!!!!
    Have you emptied the trash? (and note that iPhoto has a different trash than the finder - it is not at all clear which you are talking about)
    Somewhere the computer is keeping copies of the not-so Trashed pictures!!!!!
    Where can I find that? PC keep better track of that stuff.
    Simply not so - the Mac keeps track of files exactly as the PC does
    LN

  • I can't find the duplicates tab that i always found useful, it seems to have disappeared from the new iTunes, does anybody know what to do next?

    Where has the find duplicates function gone in the new iTunes? It use to be in a drop down task bar menu in the old versions but i can't find it in the latest.
    Also while i am in iTunes mode, when i open iTunes i get a message
    I have checked the Firewall pane of Security & Privacy preferences and the light is green as in allow, yet the message keeps coming up every time i open iTunes, any idea on how to get rid?
    All useful information greatly appreciated.

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar

  • How to find the duplicate entries in column

    clolum name descripitoin ex:
    CLIENT_NAME | Last Name | First Name | Middle Name |suffix | Tendulkar Sachin Ramesh Jr.Sachin
    | | Sachin Tendulkar Ramesh Jr.Sachin
    | | Ramesh Sachin Tendulkar Jr.Sachin
    PANno | no | AUBIU1966E
    Address | Address of clint | Any address
    Insert multiple records as per the e.g. shown in table. Write a oracle procedure in database schema to input the string and identify the possible duplicates from above table.

    942919 wrote:
    HI
    but clint name is like
    CLINT_NAME
    Sachin Tendulkar Ramesh
    Sachin Ramesh Tendulkar
    Tendulkar Sachin Ramesh
    in this senario clint name column show diffrent names
    your query is not working
    above three entries are same we need to find aboue three entries are duplicate1. Have one other column called Name2 in the table
    2. scan the table and run the "combined" (means you combined every row from below separated by a space) the below output into name2 column
    with t as (
         select 'Sachin Tendulkar Ramesh' col from dual
         select TRIM(substr (splitted,
              instr (splitted, ' ', 1, level ) + 1,
              instr (splitted, ' ', 1, level+1) - instr (splitted, ' ', 1, level) -1 )) as ret_row
         from (select ' '||col||' ' splitted
         from t)
         connect by level <= length(splitted)-length(replace(splitted,' ',''))+1
         and instr (splitted, ' ', 1, level+1) - instr (splitted, ' ', 1, level) -1 > 0 order by 1;
    3. now run this
    select name2,count(*)
    the same like above but group by name2, then you will see it

  • Suggest the best method to find the duplicate values entry in the form

    Hi,
    Can u plz suggest a best logic for duplicate checking in forms while entering the data.
    for e.g when we enter empno,empname,sal etc.. details in a base table block,
    empname should not be duplicate. For this purpose for each entry of empname, I am using the logic in such a way that
    it will check from first record to last record in the loop. If entered empname already exists in the block it shows the error message.
    for this purpose I use the system variable system.cursor_record, Name_in function etc..
    But in the case of thousands or lacks of record in the form, Is this logic useful?? Plz suggest a best logic if you have?
    with thanks
    gms

    Hello,
    <p>Here is one solution</p>
    Francois

  • I have multiple iPhoto libraries w/ duplicates in several. How can I consolidate and find the dupes? Some photos are versions of the original.

    I have multiple iPhoto libraries w/ duplicates in several. How can I consolidate and find the dupes? Some photos are versions of the original. On my iMac, I also have many folders containing some of the same photos. My computer is used for both personal and business purposes. My libraries should be separated, one for each.

    To merge libraries use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  or Aperature
    To find duplicates within an iPhoto library use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - 
    Photos that are not in an iPhoto library can be imported telling iPhoto not to import duplicates (an imperfect procews) and then IPLM can find the duplicates
    As to keeping seperate libraries - only you can do that - IPLM can move photos between libraries for you but only you can know which photos should be in which library
    LN

  • How to get the duplicate(exist) rows in Oracle?

    Good morning,
    I want to write the query to find the duplicate rows in the table.
    SELECT ITEM, MFT_ITEM, MFT, DESC FROM ITEM
    In the item table,if MFT_ITEM is coming more than or equal to twice ,it is a duplicate rows.MFT_ITEM is a unique.
    ITEM    MFT_ITEM   MFT              DESC
    4647 4648 C6253 TOOLS
    4647 4648 A0237 TOOLS
    10PS 10PS A0027 KITS
    10PS 11PS A0028 COVER
    12LN 12LN A0034 NUTS
    12LN 12LN A0035 NUTS
    12LN 13LN A0036 SCREW
    4310 4311 00462 POWER
    4310 4311 31645 POWER
    4310 4311 81205 POWER
    I want the results like
    ITEM    MFT_ITEM   MFT              DESC
    4647 4648 C6253 TOOLS
    4647 4648 A0237 TOOLS
    12LN 12LN A0034 NUTS
    12LN 12LN A0035 NUTS
    4310 4311 00462 POWER
    4310 4311 31645 POWER
    4310 4311 81205 POWER
    Please reply

    Nicole Thanks for your advise,
    I try the below query , I am getting 0 rows.
    With t As
    Select 4647 ITEM,4648 MFG_ITEM, 'C6253' MFG ,'Tools' Descrip From dual Union All
    Select 4647 ,4648 , 'A0237' ,'Tools' From dual Union All
    Select 1088 ,1088 , 'A0027' ,'Kits' From dual Union All
    Select 1088 ,1188 , 'A0028' ,'Covers' From dual Union All
    Select 1245 ,1245 , 'A0034' ,'Nuts' From dual Union All
    Select 1245 ,1245 , 'A0035' ,'Nuts' From dual Union All
    Select 1245 ,1345 , 'A0036' ,'Screw' From dual Union All
    Select 4310 ,4313 , 'A0046' ,'Power' From dual Union All
    Select 4310 ,4313 , 'A3164' ,'Power' From dual Union All
    Select 4310 ,4313 , 'A0462' ,'Power' From dual
    )Select ITEM, MFG_ITEM,MFG,DESCRIP From
    Select ITEM, MFG_ITEM,MFG,DESCRIP,
    Count(MFG_ITEM) over (Partition By ITEM Order By ITEM) cnt
    From t
    ) Where cnt > 1;
    I should get the results like below
    ITEM     MFG_ITEM     MFG     DESCRIP
    4647     4648     C6253     Tools
    4647     4648     A0237     Tools
    1245     1245     A0034     Nuts
    1245     1245     A0035     Nuts
    4310     4313     A0046     Power
    4310     4313     A3164     Power
    4310     4313     A0462     Power
    Please reply

  • TS1363 I'm trying to hook up my new Apple TV, but can't find the advanced settings in iTunes. Where is it?

    The Apple TV says change the settings in "Advanced settings", but I can't find "Advanced settings" in iTunes anywhere.

    You might need to bring up the menu bar first.
    If you're using version 11.0.1.12, click on the wee boxy icon up in the top-left corner of your iTunes to see the "Show Menu Bar" control, as per the following screenshot:
    Now you should be able to find the duplicates thing in the View Menu.
    (If you're still using iTunes version 11.0.0.163, you'd need to update to 11.0.1.12 to get the Display duplicates control.)
    EDIT: Sorry, in the initial version of this reply, I said the Show Duplicate items was in the File Menu. It's in the View Menu in version 11.0.1.12.

Maybe you are looking for