Finding duplicate names

I want to find duplicate names from my database I wrote the following query. But it is displaying more that existing records. I guess it is taking cartesian product.
select a.name from emp from emp a,emp b where a.name=b.name;
can anyone correct this query.
I want to display all the duplicate records having same names...
for example for the following table. I want to display result having same dname like
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
50 SALES hyd
output should be
30 sales chicago
50 sales hyd

Welcome to OTN.
From your initial sample data - i didn't find anything duplicate. They all are unique if you consider deptno.
But, i assume you have plenty of redundant data. So, your query may be look like ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.16
satyaki>
satyaki>
satyaki>create table dup_emp
  2     as
  3       select k.*
  4       from (
  5              select * from emp
  6              union all
  7              select * from emp
  8              where rownum < 6
  9            ) k;
Table created.
Elapsed: 00:00:03.90
satyaki>
satyaki>
satyaki>select * from dup_emp;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
      7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       7000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
      7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
18 rows selected.
Elapsed: 00:00:00.32
satyaki>
satyaki>
satyaki>select empno, count(empno)
  2  from dup_emp
  3  group by empno
  4  having count(empno) > 1;
     EMPNO COUNT(EMPNO)
      9999            2
      7777            2
      7521            2
      7566            2
      7654            2
Elapsed: 00:00:00.11
satyaki>
satyaki>
satyaki>Regards.
Satyaki De.

Similar Messages

  • Can iPhoto find Duplicate Photos

    Can iPhoto find Duplicate Photos like iView Media can? I don't mean finding duplicate names, but rather analyzing the actual photo itself and finding doubles.
    Strangly enough, this is one of the remaining reasons for me needing to use iView for some tasks.
    Powerbook G4    

    No, iPhoto hasn't this functionality. It would be a nice feature though.
    You can also use GraphicConverter to find your duplicate photos.
    Powermac G5   Mac OS X (10.4.4)  

  • Script to find duplicate index and how can we tell if an index is REALLY a duplicate?

    Does any one have script to find duplicate index? and how can we tell if an index is REALLY a duplicate?
    Rahul

    One more written by Itzik Ben-Gan
    The first query finds exact matches. The indexes must have 
    the same key columns in the same order, and the same included columns but in any order. 
    These indexes are sure targets for elimination. The only caution would be to check for index hints. 
    -- exact duplicates
    with indexcols as
    select object_id as id, index_id as indid, name,
    (select case keyno when 0 then NULL else colid end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by keyno, colid
    for xml path('')) as cols,
    (select case keyno when 0 then colid else NULL end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by colid
    for xml path('')) as inc
    from sys.indexes as i
    select
    object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
    c1.name as 'index',
    c2.name as 'exactduplicate'
    from indexcols as c1
    join indexcols as c2
    on c1.id = c2.id
    and c1.indid < c2.indid
    and c1.cols = c2.cols
    and c1.inc = c2.inc;
    The second variation of this query finds partial, or duplicate, indexes 
    that share leading key columns, e.g. Ix1(col1, col2, col3) and Ix2(col1, col2) 
    would be considered duplicate indexes. This query only examines key columns and does not consider included columns. 
    These types of indexes are probable dead indexes walking. 
    -- Overlapping indxes
    with indexcols as
    select object_id as id, index_id as indid, name,
    (select case keyno when 0 then NULL else colid end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by keyno, colid
    for xml path('')) as cols
    from sys.indexes as i
    select
    object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
    c1.name as 'index',
    c2.name as 'partialduplicate'
    from indexcols as c1
    join indexcols as c2
    on c1.id = c2.id
    and c1.indid < c2.indid
    and (c1.cols like c2.cols + '%' 
    or c2.cols like c1.cols + '%') ;
    Be careful when dropping a partial duplicate index if the two indexes differ greatly in width. 
    For example, if Ix1 is a very wide index with 12 columns, and Ix2 is a narrow two-column index 
    that shares the first two columns, you may want to leave Ix2 as a faster, tighter, narrower index.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I find duplicate photos in iPhoto

    I have so many duplicates in iPhoto that my library files is way too large by thousands of photos. I need to find a way to weed out duplicate photos. Anyone know how?
    Thanks,
    Barb

    Where are you seeing these duplicates?  If you're seeing them from withing the iPhoto window then you can use one of the apps listed below.
    If you're seeing those "duplicate" files via the Finder then you don't have duplicates.  iPhoto will have a minimum of 2 files in it's lbrary for each file imported.  So don't relay on what you see via the Finder regarding duplicates in the iPhoto library.
    T
    hese applications will identify and help remove duplicate photos from an iPhoto Library:
    iPhoto Library Manager - $29.95
    Duplicate Annihilator - $7.95 - only app able to detect duplicate thumbnail files or faces files when an iPhoto 8 or earlier library has been imported into another.
    PhotoSweeper - $9.95 - This app can search by comparing the image's bitmaps or histograms thus finding duplicates with different file names and dates.
    DeCloner - $19.95 - can find duplicates in iPhoto Libraries or in folders on the HD.
    DupliFinder - $7 - shows which events the photos are in.
    iPhoto AppleScript to Remove Duplicates - Free
    Some users have reported that PhotoSweeper did the best in finding all of the dups in their library: i photo has duplicated many photos, how...: Apple Support Communities.
    If you have an iPhone and have it set to keep the normal photo when shooting HDR photos the two image files that are created will be duplicates in a manner of speaking (same image) but the only duplicate finder app that detected the iPhone HDR and normal photos as being duplicates was PhotoSweeper.  None of the other apps detected those two files as being duplicates as they look for file name as well as other attributes and the two files from the iPhone have different file names.
    iPLM, however, is the most versatile and best all around iPhoto utility to have.
    OT

  • How do i find duplicate photos in my iPhoto library?

    How do i find duplicate photos in my iPhoto library?

    These applications will identify and help remove duplicate photos from an iPhoto Library:
    iPhoto Library Manager - $29.95
    Duplicate Annihilator - $7.95 - only app able to detect duplicate thumbnail files or faces files when an iPhoto 8 or earlier library has been imported into another.
    PhotoSweeper - $9.95 - This app can search by comparing the image's bitmaps or histograms thus finding duplicates with different file names and dates.
    DeCloner - $19.95 - can find duplicates in iPhoto Libraries or in folders on the HD.
    DupliFinder - $7 - shows which events the photos are in.
    iPhoto AppleScript to Remove Duplicates - Free
    PhotoDedupo - $4.99 (App Store) -  this app has a "similar" search feature which is like PhotoSweeper's bitmap comparison.  It found all duplicates
    Duplicate Cleaner for iPhoto - free - was able to recognize the duplicated HDR and normal files from an iPhone shooting in HDR
    Some users have reported that PhotoSweeper did the best in finding all of the dups in their library: iphoto has duplicated many photos, how...: Apple Support Communities.
    If you have an iPhone and have it set to keep the normal photo when shooting HDR photos the two image files that are created will be duplicates in a manner of speaking (same image) but there are only twp apps that detected the iPhone HDR and normal photos as being duplicates:  PhotoSweeper and Duplicate Cleaner for iPhoto.  None of the other apps detected those two files as being duplicates as they look for file name as well as other attributes and the two files from the iPhone have different file names.
    iPLM, however, is the best all around iPhoto utility as it can do so much more than just find duplicates.  IMO it's a must have tool if using iPhoto.

  • Finding duplicate entries in address book

    I am using Address Book 5.0.3, where I have been using LinkedIn's CardMunch to import contact details via my iPhone. However, I now end up with three distinct issues regarding duplicate entries:
    1/ two people with the same name, e.g. John Smith, but I know they are two separate people and they work for different companies.
    2/ After an import, I may have some duplicate entries, say Alan Walker, who has moved from company A to company B and I want to replace his old contact details with the new information.
    3/ two duplicate entries the same name, say Brian Vickers, both of which refer to the same person who still works for the same company, but has new contact details or additional data, such as a mobile number that I did not have before.
    4/ two duplicate entries that are identical. E.g. I imported the same card twice for some reason.
    5/ multiple entries marked 'Cannot Read Name', where CardMunch had a problem, but I know they are different people and I have to edit these to manually enter the correct information.
    Unfortunately the Address Book find duplicates function, whilst it works, does nothing useful. The only option I am presented with is 'Merge', which in all of the scenarios above apart from item 4 I do not want to do a merge function - I want to either 'Mark as NOT Duplicates' (item 1/), 'Replace Selected Fields' e.g. show me the two cards side by side and allow me to select which fields from which card are to be kept, replaced or removed and then implement the merge (item 2), "Add New Information' but allow me to select the label for that information before merging so that if someone has a new iPhone, but is still keeping their old mobile, I can select the field label correctly and then merge (item 3) or 'Edit Card' which allows me to open any identified duplicate and add in missing information that would mean that it is no longer a duplicate item.
    Can anyone suggest a way of doing this, or can Apple's developers please add these features to the Address Book App as soon as possible?
    Thanks, Russ Taylor

    books06,
    Welcome to Apple Discussions.
    It depends upon which version of Address Book you are using, and your definition of "view."
    1. Address Book 3.1.1 Help
    2. Address Book 4.0.3 Help: Combining duplicate cards and information
    To find and merge duplicate cards:
    1. Choose Card > "Look for Duplicate Entries."
    2. Address Book tells you if it finds duplicate cards, cards containing duplicated information, or both.
    3. Click Merge to merge duplicate cards and remove redundant information on cards.
    When Address Book merges duplicate cards, it creates a single card for the contact containing all of the unique information from each merged card. Address Book uses the picture from the merged card appearing first in the list.
    To merge selected cards only, Command-click to select the cards you want to combine and choose Card > Merge Selected Cards. Address Book creates a single card using the name and picture of the selected card appearing first in the list.;~)

  • You cannot add a job with a duplicate name, as a web service already exists with name ... please rename the job and try again

    We are attempting to add a web service job and getting a duplicate name issue.  I believe we have a caching issue where this job name may already exist but we are unable to see it on the web services status page.
    Is there a data services repository database table where I can find these web services jobs listed and clean it up from the backend?

    There is no option there that shows me if it is being used as a web service.  Here is my issue with some screen shots.
    I look at my current web service enabled jobs looking for B_JOB_CP_MDR_to_GW_EMP but it is not in the list.
    I attempt to add it from repository DWXDS9
    It throws an error and tells me there is already a web service with this name...
    Now there has got to be an internal data services table somewhere that has this job listed as a web service.  I am just trying to figure out what that table may be to determine if we can do some type of cleanup on it so we can add this job again as a web service (so it is visible to us).

  • Best way to find duplicates

    hello everyone. i'm trying to free up space on my hard drive. what is the easiest way to find and delete duplicate photos and files. specifically in iphoto. thank you.

    You can use one of these applications to identify and remove duplicate photos from an iPhoto Library:
    iPhoto Library Manager - $29.95
    Duplicate Cleaner for iPhoto - free
    Duplicate Annihilator - $7.95 - only app able to detect duplicate thumbnail files or faces files when an iPhoto 8 or earlier library has been imported into another.
    PhotoSweeper - $9.95 - This app can search by comparing the image's bitmaps or histograms thus finding duplicate images with different file names and dates.
    DeCloner - $19.95 - can find dupicates in iPhoto Libraries or in folders on the HD.
    OT

  • Java.lang.reflect.InvocationTargetException: Duplicate name

    I have a class and demo program that compile. When I try to run them I get the error
    "java.lang.reflect.InvocationTargetException: Duplicate name"
    Can anybody give me an idea of where to start tracking down this problem? I can't see anything that looks duplicated and I can't find any help on this particular issue.
    Thanks,
    Abigail

    I guess I can go ahead an post the code that I do have. This works when compiled and run from the command line.
    Here's my demo program
    import java.util.*;
    import java.lang.*;
    public class FileSortingDemo {
    public static void main(String[] args)
    /* Create an array of FileSorting object */
    int sortOrder = Integer.parseInt(args[0]);
    FileSorting[] files = new FileSorting[3];
    files[0] = new FileSorting(sortOrder,"1.xml",19990101,501);
    files[1] = new FileSorting(sortOrder,"2.xml",19990201,502);
    files[2] = new FileSorting(sortOrder,"0.xml",19990202,499);
    /* Sort array */
    Arrays.sort(files);
    /* Print out sorted values */
    for(int i = 0; i < files.length; i++)
    System.out.println(files.file_name + "     " +
    files[i].file_date + "     " + files[i].file_size);
    //End of Demo Prog
    Here's the class
    import java.util.*;
    public class FileSorting implements Comparable
    public int sort_order;
    public String file_name;
    public long file_date;
    public long file_size;
    public FileSorting(int sort_order, String file_name, long file_date, long file_size)
         this.sort_order = sort_order;
    this.file_name = file_name;
    this.file_date = file_date;
    this.file_size = file_size;
    /* Overload compareTo method */
    public int compareTo(Object obj)
    FileSorting tmp = (FileSorting)obj;
    switch ( tmp.sort_order )
              case 0:
                   if(this.file_name.compareTo(tmp.file_name) < 0)
                   /* instance lt received */
                   return -1;
                   else if(this.file_name.compareTo(tmp.file_name) > 0)
                   /* instance gt received */
                   return 1;
                   /* instance == received */
                   return 0;
              case 1:
                   if(this.file_date < tmp.file_date)
                   /* instance lt received */
                   return -1;
                   else if(this.file_date > tmp.file_date)
                   /* instance gt received */
                   return 1;
                   /* instance == received */
                   return 0;
              case 2:
                   if(this.file_size < tmp.file_size)
                   /* instance lt received */
                   return -1;
                   else if(this.file_size > tmp.file_size)
                   /* instance gt received */
                   return 1;
                   /* instance == received */
                   return 0;
              default:
                   if(this.file_name.compareTo(tmp.file_name) < 0)
                   /* instance lt received */
                   return -1;
                   else if(this.file_name.compareTo(tmp.file_name) > 0)
                   /* instance gt received */
                   return 1;
                   /* instance == received */
                   return 0;

  • How to find duplicate images?

    How do I use Bridge CS5 to find duplicate images and delete them?

    I'm having the same issue as aljCharlie.  Using Find won't work for me due to several reasons.  First, I have 30k+ images in the folder.  Secondly, the images have differing file names but are ultimately duplicate images.
    So, I suppose this has been asked and answered, but just in case it hasn't: Does Bridge have any sort of visual duplicate finder that compares the content of the images rather than simply the file names?  I'm thinking of something like TinEye.  Maybe I should post this in the Feature Request forum.  Hmm.
    Thanks!
    -Greg

  • Hi  anyone found a method of finding duplicate photos

    anyone found a method of finding duplicate photos
    The sort could by by date, name, Lat Long or any other method

    These applications will identify and help remove duplicate photos from an iPhoto Library:
    iPhoto Library Manager - $29.95
    Duplicate Annihilator - $7.95 - only app able to detect duplicate thumbnail files or faces files when an iPhoto 8 or earlier library has been imported into another.
    PhotoSweeper - $9.95 - This app can search by comparing the image's bitmaps or histograms thus finding duplicates with different file names and dates.
    DeCloner - $19.95 - can find duplicates in iPhoto Libraries or in folders on the HD.
    DupliFinder - $7 - shows which events the photos are in.
    iPhoto AppleScript to Remove Duplicates - Free
    Some users have reported that PhotoSweeper did the best in finding all of the dups in their library: i photo has duplicated many photos, how...: Apple Support Communities.
    If you have an iPhone and have it set to keep the normal photo when shooting HDR photos the two image files that are created will be duplicates in a manner of speaking (same image) but the only duplicate finder app that detected the iPhone HDR and normal photos as being duplicates was PhotoSweeper.  None of the other apps detected those two files as being duplicates as they look for file name as well as other attributes and the two files from the iPhone have different file names.
    iPLM, however, is the most versatile and best all around iPhoto utility to have.
    OT

  • Automatically find duplicates in Itunes

    Greetings,
    I have a relatively large Itunes library of over 300gbs. I changed a band's album name and Itunes kept both folders in the Itunes folder while only displaying the updated name change. This modification created duplicate songs albeit the album names are different. Itunes kept both versions which leads me to think I may have many duplicate songs. The normal "display duplicates" methods on Itunes doesn't find them. Does anyone know a method to find duplicates other than manually viewing each file within the Itunes music folder? Thanks.

    Thanks. Shortly afterwards, I tested my theory and it won't well. I simply opened my Itunes music folder and choose the bands folder with the duplicates. I dragged them into my library and Itunes listing them as duplicates so I deleted the songs with the old album title.

  • Help with Finding Duplicate records Query

    HI,
    I am trying to write a query that will find duplicate records/cases.
    This query will be used in a report.
    So, here are the requirements:
    I need to find duplicate cases/records based on the following fields:
    DOB, DOCKET, SENT_DATEI was able to do that with the following query. The query below is able to give me all duplicate records based on the Criteria above
    SELECT      DEF.BIRTH_DATE DOB,
               S.DOCKET DOCKET,
               S.SENT_VIO_DATE SENT_DATE, COUNT(*)
    FROM SENTENCES S,
                DEFENDANTS DEF
    WHERE      S.DEF_ID = DEF.DEF_ID
    AND       S.CASE_TYPE_CODE = 10
    GROUP BY  DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE
    HAVING COUNT(*) > 1;
    //I AM GOING TO CALL THIS QUERY 'X'Now, the information to be displayed on the report: defendants Name, DOB, District, Docket, Def Num, Sent Date, and PACTS Num if possible.
    The problem that I need help on is how to combine those queries together (what I mean is a sub query). the 'X' query returns multiple values. please have a look at the comments on the query below to see what I'm trying to achieve.
    here is the main query:
    SELECT      INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
    FROM      USSC_CASES.DEFENDANTS DEF,
            USSC_CASES.SENTENCES S,
            LOOKUP.DISTRICTS DIST
    WHERE      DEF.DEF_ID = S.DEF_ID
    AND      S.DIST_ID = DIST.USSC_DISTRICT_ID
    AND     S.CASE_TYPE_CODE = 10
    AND     S.USSC_ID IS NOT NULL
    AND // what i'm trying to do is: DOB, DOCKET, SENT_DATE IN ('X' QUERY), is this possible ??
    ORDER BY DEFENDANT_NAME; thanks in advance.
    I am using Oracle 11g, and sql developer.
    if my approach doesn't work, is there a better approach ?
    Edited by: Rooney on Jul 11, 2012 3:50 PM

    If I got it right, you want to join table USSC_CASES.DEFENDANTS to duplicate rows in USSC_CASES. If so:
    SELECT  INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
      FROM  USSC_CASES.DEFENDANTS DEF,
             SELECT  *
               FROM  (
                      SELECT  S.*,
                              COUNT(*) OVER(PARTITION BY DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE) CNT
                        FROM  USSC_CASES.SENTENCES S
               WHERE CNT > 1
            ) S,
            LOOKUP.DISTRICTS DIST
      WHERE DEF.DEF_ID = S.DEF_ID
       AND  S.DIST_ID = DIST.USSC_DISTRICT_ID
       AND  S.CASE_TYPE_CODE = 10
       AND  S.USSC_ID IS NOT NULL
      ORDER BY DEFENDANT_NAME;If you want to exclude duplicates from the query and do not care which row out of duplicate rows to choose:
    SELECT  INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
      FROM  USSC_CASES.DEFENDANTS DEF,
             SELECT  *
               FROM  (
                      SELECT  S.*,
                              ROW_NUMBER() OVER(PARTITION BY DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE ORDER BY 1) RN
                        FROM  USSC_CASES.SENTENCES S
               WHERE RN = 1
            ) S,
            LOOKUP.DISTRICTS DIST
      WHERE DEF.DEF_ID = S.DEF_ID
       AND  S.DIST_ID = DIST.USSC_DISTRICT_ID
       AND  S.CASE_TYPE_CODE = 10
       AND  S.USSC_ID IS NOT NULL
      ORDER BY DEFENDANT_NAME;SY.

  • How can i find Duplicate Rows in forms6i

    Hi,
    How can i find duplicate rows in multiple record in forms6i.
    Thanks
    Raghu.K

    Oops, sorry for misreading your question. (However the SQL I gave you above is also very handy, and worth saving.)
    Okay, this is off the top of my head and untested, but might just work. Assuming that your data block name is MYBLOCK, and that the item that you want to check for dups on is named MYNUM, create an item-level WHEN-VALIDATE-ITEM trigger with the following code.
    declare
    l_newest_record number(10) := :system.cursor_record;
    l_newest_mynum number(10) := :myblock.mynum;
    l_dup_found boolean := false;
    begin
    -- In this loop, we skip backwards through all new records to look for dups.
    while :system.cursor_record > 1 loop
    previous_record;
    if :system.record_status = 'NEW' then
    if :myblock.mynum := l_newest_mynum then
    l_dup_found := true;
    exit; -- Dup found!
    end if;
    else
    exit; -- We've gone backwards past the first new record.
    end if;
    end loop;
    -- In this loop, we return to the current record.
    while :system.cursor_record < l_newest_record loop
    next_record;
    end loop;
    if l_dup_found then
    raise duplicate_row_found; -- user-defined exception
    end if;
    end;
    The above code only checks for dups in the new form records. It assumes that a unique constraint in the database will deal with records actually committed.
    Armand

  • Find duplicate ACLs

    Hello there
    is there a way to find duplicate ACLs on cisco ASA?
    I have just restored running-config (nearly 800 ACLs) onto our new ASA and it threw out a message :WARNING: ACL-name found duplicate element
    the model we have is 5512-x, I googled it online but no success so far, 
    Rdgs!                  

    Hi,
    I kind of wonder what the actual situation is.
    I would think that the WARNING message means that you were trying to enter a single ACL rule (= ACE) that already existed in the ACL.
    To my understanding the only way you can have identical ACEs in a single ACL when you have one ACE using a simple permit statement mentioning the IPs/ports in the command and when you have the same done with "object-group". In this situation to my understanding the ASA will actually have 2 identical rules (even though configured differently)
    For example
    access-list TEST permit tcp host 1.1.1.1 host 2.2.2.2 eq 80
    or
    object-group network SOURCE
    network-object host 1.1.1.1
    object-group network DESTINATION
    network-object host 2.2.2.2
    access-list TEST permit tcp object-group SOURCE object-group DESTINATION eq 80
    This will produce the following ACL
    access-list TEST extended permit tcp host 1.1.1.1 host 2.2.2.2 eq www
    access-list TEST extended permit tcp object-group SOURCE object-group DESTINATION eq www
    When we look at the ACL in opened form we see that the actual rules are identical
    access-list TEST; 2 elements; name hash: 0xd37fdb2b
    access-list TEST line 1 extended permit tcp host 1.1.1.1 host 2.2.2.2 eq www (hitcnt=0) 0xd82b1952
    access-list TEST line 2 extended permit tcp object-group SOURCE object-group DESTINATION eq www 0xbcf2cfe7
      access-list TEST line 2 extended permit tcp host 1.1.1.1 host 2.2.2.2 eq www (hitcnt=0) 0xd82b1952
    Yet you say that you were moving an previous configuration to the device so it should be valid configuration as it was already used on an ASA.
    Are you sure that you have not just copy/pasted same lines again or perhaps used somekind of "show access-list" output as the base of some configuration? That what I was thinking with the above example I mentioned that the access-list output might have identical rules even though the configuration format is different.
    - Jouni

Maybe you are looking for

  • GPS LD-3W and nokia 5800 charger

    hi , i have a nokia 5800 and a wireless gps module ( LD-3W) . in bundle for Gps i received a DC-4 car charger  but i need also charge GPS module at home . May i use the nokia 5800 charger for this ?  i remember that :  5800 charger is  5v/890mA .. an

  • 1.6 bug list

    I don't know if anybody from Apple scans this forum, but over on the Digidesign message board they seem to check in so they can be aware of all bugs. I'm new to WB, I love it but it would be great if these small bugs got fixed soon. The two main ones

  • How to determine which archive logs are needed in flashback.

    Hi, Let's assume I have archive logs 1,2,3,4, then a "backup database plus archivelogs" in RMAN, and then archive logs 5+6. If I want to flashback my database to a point immediately after the backup, how do I determine which archive logs are needed?

  • E72 Scoll among mailboxes and adding a 3rd box to ...

    Hi - new E72 user and am curious how I can do the following: 1. If I am in a mailbox's inbox, and I want to go to my other mailboxes, is there some shortcut I can use to scroll through the inboxes of each mailbox?  Currently I am scrolling to the top

  • QM Desktop - Report tab displays blank page

    Hi all, I'm currently running UCCX7.0(1) with QM2.7(3) and i'm facing the following issue. Thru QM Desktop - Report tab, an IE page will be displayed to show the available reports that we wish to run. It's trying to launch the following link https://