How to remove duplicate records? Please help!

^
Dear Friends
I am new comer to this forum and had a simple SQL question. I would appreciate if anyone can help.
Many Thanx!
[email protected]
The Question:
Suppose we have some interviewers who specify the times they are available. At each interview 2 interviewers must be present.
A relation is set up to contain the available times for each interviewer, which has these fields: interviewerID, date, time. For example:
1, 14/12/04, 9:00-10:00
1, 14/12/04, 12:00-1:00
2, 12/11/04, 11:00-12:00
etc.
Then how can we write a SQL query that produces the times during which 2 interviewers are available?
A Possible Answer:
The following query produces the times during which 2 interviewers are available, however it has duplicate records:
SELECT a1.interviewerID, a2.interviewerID, a1.date, a1.time
FROM AvailabileTimes as a1, AvailableTimes as a2
WHERE a1.date = a2.date AND a1.time = a2.time AND a1.interviewerID <> a2.interviewerID
An example of the output is:
1, 2, 12/12/04, 10:00-11:00
1, 3, 14/10/03, 12:00-1:00
2, 1, 12/12/04, 10:00-11:00
etc.
where line 3 is a duplicate of line 1 (only the place of interviewerID is changed)

Thanx scott for your quick reply!!
this solves the problem for now, and is a very good idea!
But I was told this might have problems if interviewID field is later changed to something that contains letters instead of a pure numeric value e.g. staffAB-01-ZC.
Do you know what I should do to have a long term solution?

Similar Messages

  • How to remove duplicates records from output ?

    how to remove duplicates records from output ?  i used delete adjacent but duplicates records are coming again ..suggest me

    hi shruthi,
    thanks for ur answer ..but duplicates records coming again
    here is my code >> plz check it out
    *& Report  ZCRM_TROUBLE_TICKET
    REPORT  zcrm_trouble_ticket.
    TYPES : BEGIN OF ty_qmih,
            qmnum TYPE qmnum,
            equnr TYPE equnr,
            iloan TYPE iloan,
            ausvn TYPE ausvn,
            ausbs TYPE ausbs,
            auztv TYPE auztv,
            auztb TYPE auztb,
            iwerk TYPE iwerk,
            END OF ty_qmih,
            BEGIN OF ty_qmel,
            qmnum TYPE qmnum,
            qmtxt TYPE qmtxt,
            indtx TYPE indltx,
            priok TYPE priok,
            strmn TYPE strmn,
            strur TYPE strur,
            ltrmn TYPE ltrmn,
            ltrur TYPE ltrur,
            objnr TYPE qmobjnr,
            arbpl TYPE lgwid,
            vkorg TYPE vkorg,
            vtweg TYPE vtweg,
            spart TYPE spart,
            END OF ty_qmel,
            BEGIN OF ty_ihpa,
            parnr TYPE i_parnr,
            parvw TYPE parvw,
            objnr TYPE qmobjnr,
            END OF ty_ihpa,
            BEGIN OF ty_crhd,
            arbpl TYPE arbpl,
            objid TYPE cr_objid,
            END OF ty_crhd,
            BEGIN OF ty_crtx,
            ktext TYPE cr_ktext,
            objid TYPE cr_objid,
            END OF ty_crtx,
            BEGIN OF ty_qmfe,
            fecod TYPE fecod,
            fegrp TYPE fegrp,
            qmnum TYPE qmnum,
            END OF ty_qmfe,
            BEGIN OF ty_qmur,
            urcod TYPE urcod,
            urgrp TYPE urgrp,
            urtxt TYPE urstx,
            qmnum TYPE qmnum,
            END OF ty_qmur,
            BEGIN OF ty_iloa,
            tplnr TYPE tplnr,
            iloan TYPE iloan,
            END OF ty_iloa,
            BEGIN OF ty_output,
            qmnum TYPE qmnum,
            equnr TYPE equnr,
           iloan TYPE iloan,
            ausvn TYPE ausvn,
            ausbs TYPE ausbs,
            auztv TYPE auztv,
            auztb TYPE auztb,
            iwerk TYPE iwerk,
            qmtxt TYPE qmtxt,
            indtx TYPE indltx,
            priok TYPE priok,
            strmn TYPE strmn,
            strur TYPE strur,
            ltrmn TYPE ltrmn,
            ltrur TYPE ltrur,
           objnr TYPE qmobjnr,
           arbpl TYPE lgwid,
            vkorg TYPE vkorg,
            vtweg TYPE vtweg,
            spart TYPE spart,
            parnr TYPE i_parnr,
            parvw TYPE parvw,
            arbpl TYPE arbpl,
           objid TYPE cr_objid,
           arbpl1 TYPE arbpl,
            ktext TYPE cr_ktext,
            fecod TYPE fecod,
            fegrp TYPE fegrp,
            urcod TYPE urcod,
            urgrp TYPE urgrp,
            urtxt TYPE urstx,
            tplnr TYPE tplnr,
            END OF ty_output.
    DATA : it_qmih TYPE STANDARD TABLE OF ty_qmih,
           it_qmel TYPE STANDARD TABLE OF ty_qmel,
           it_ihpa TYPE STANDARD TABLE OF ty_ihpa,
           it_crhd TYPE STANDARD TABLE OF ty_crhd,
           it_crtx TYPE STANDARD TABLE OF ty_crtx,
           it_qmfe TYPE STANDARD TABLE OF ty_qmfe,
           it_qmur TYPE STANDARD TABLE OF ty_qmur,
           it_iloa TYPE STANDARD TABLE OF ty_iloa,
           it_output TYPE STANDARD TABLE OF ty_output,
           wa_qmih TYPE ty_qmih,
           wa_qmel TYPE ty_qmel,
           wa_ihpa TYPE ty_ihpa,
           wa_crhd TYPE ty_crhd,
           wa_crtx TYPE ty_crtx,
           wa_qmfe TYPE ty_qmfe,
           wa_qmur TYPE ty_qmur,
           wa_iloa TYPE ty_iloa,
           wa_output TYPE ty_output.
    INITIALIZATION.
      REFRESH : it_qmih,
                it_qmel,
                it_ihpa,
                it_crhd,
                it_crtx,
                it_qmfe,
                it_qmur,
                it_iloa,
                it_output.
      CLEAR:     wa_qmih,
                 wa_qmel,
                 wa_ihpa,
                 wa_crhd,
                 wa_crtx,
                 wa_qmfe,
                 wa_qmur,
                 wa_iloa,
                 wa_output.
    start-of-selection.
      SELECT  qmnum
              equnr
              iloan
              ausvn
              ausbs
              auztv
              auztb
              iwerk
              FROM qmih
              INTO  TABLE it_qmih.
      SORT it_qmih BY qmnum .
      DELETE ADJACENT DUPLICATES FROM it_qmih COMPARING qmnum equnr iloan ausvn ausbs auztv auztb iwerk.
      SELECT   qmnum
               qmtxt
               indtx
               priok
               strmn
               strur
               ltrmn
               ltrur
               objnr
               arbpl
               vkorg
               vtweg
               spart
               FROM qmel
               INTO TABLE it_qmel
               FOR ALL ENTRIES IN it_qmih
               WHERE qmnum = it_qmih-qmnum.
      SORT it_qmel BY qmnum.
      DELETE ADJACENT DUPLICATES FROM it_qmel COMPARING  qmnum
                                                         qmtxt
                                                         indtx
                                                         strmn
                                                         strur
                                                         ltrmn
                                                         ltrur
                                                         objnr
                                                         arbpl
                                                         vkorg
                                                         vtweg
                                                         spart.
      IF it_qmel IS NOT INITIAL.
        SELECT parnr
               parvw
               objnr
               FROM ihpa
               INTO TABLE it_ihpa
               FOR ALL ENTRIES IN it_qmel
               WHERE objnr = it_qmel-objnr.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM it_ihpa COMPARING  parnr
                                                         parvw
                                                         objnr.
      IF it_qmel IS NOT INITIAL.
        SELECT arbpl
               objid
               FROM crhd
               INTO TABLE it_crhd
               FOR ALL ENTRIES IN it_qmel
               WHERE objid = it_qmel-arbpl.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM it_crhd COMPARING  arbpl
                                                         objid.
      IF it_qmel IS NOT INITIAL.
        SELECT ktext
               objid
               FROM crtx
               INTO TABLE it_crtx
               FOR ALL ENTRIES IN it_crhd
               WHERE objid = it_crhd-objid.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM it_crtx COMPARING ktext
                                                        objid.
      IF it_qmih IS NOT INITIAL.
        SELECT fecod
               fegrp
               qmnum
               FROM qmfe
               INTO TABLE it_qmfe
               FOR ALL ENTRIES IN it_qmih
               WHERE qmnum = it_qmih-qmnum.
      ENDIF.
      SORT it_qmfe BY qmnum.
      DELETE ADJACENT DUPLICATES FROM it_qmfe COMPARING fecod
               fegrp.
      IF it_qmih IS NOT INITIAL.
        SELECT urcod
               urgrp
               urtxt
               qmnum
               FROM qmur
               INTO TABLE it_qmur
               FOR ALL ENTRIES IN it_qmih
               WHERE qmnum = it_qmih-qmnum.
      ENDIF.
      SORT it_qmur BY qmnum.
      DELETE ADJACENT DUPLICATES FROM  it_qmur COMPARING urcod
                                                         urgrp
                                                         urtxt.
      IF it_qmih IS NOT INITIAL.
        SELECT  tplnr
                iloan
                FROM iloa
                INTO TABLE it_iloa
                FOR ALL ENTRIES IN it_qmih
                WHERE iloan = it_qmih-iloan.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM it_iloa COMPARING tplnr
                                                        iloan.
      LOOP AT it_qmih INTO wa_qmih.
        wa_output-qmnum = wa_qmih-qmnum.
        wa_output-equnr = wa_qmih-equnr.
       wa_output-iloan = wa_qmih-iloan.
        wa_output-ausvn = wa_qmih-ausvn.
        wa_output-ausbs = wa_qmih-ausbs.
        wa_output-auztv = wa_qmih-auztv.
        wa_output-auztb = wa_qmih-auztb.
        wa_output-iwerk = wa_qmih-iwerk.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_qmel INTO wa_qmel WITH KEY qmnum = wa_qmih-qmnum.
        wa_output-qmtxt = wa_qmel-qmtxt.
        wa_output-indtx = wa_qmel-indtx.
        wa_output-priok = wa_qmel-priok.
        wa_output-strmn = wa_qmel-strmn.
        wa_output-strur = wa_qmel-strur.
        wa_output-ltrmn = wa_qmel-ltrmn.
        wa_output-ltrur = wa_qmel-ltrur.
       wa_output-objnr = wa_qmel-objnr.
       wa_output-arbpl = wa_qmel-arbpl.
        wa_output-vkorg = wa_qmel-vkorg.
        wa_output-vtweg = wa_qmel-vtweg.
        wa_output-spart = wa_qmel-spart.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_ihpa INTO wa_ihpa WITH KEY objnr = wa_qmel-objnr.
        wa_output-parnr = wa_ihpa-parnr.
        wa_output-parvw = wa_ihpa-parvw.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_crhd INTO wa_crhd WITH KEY objid = wa_qmel-arbpl.
        wa_output-arbpl = wa_crhd-arbpl.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_crtx INTO wa_crtx WITH KEY objid = wa_crhd-objid.
        wa_output-ktext = wa_crtx-ktext.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_qmfe INTO wa_qmfe WITH KEY qmnum = wa_qmih-qmnum.
        wa_output-fecod = wa_qmfe-fecod.
        wa_output-fegrp = wa_qmfe-fegrp.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_qmur INTO wa_qmur WITH KEY qmnum = wa_qmih-qmnum.
        wa_output-urcod = wa_qmur-urcod.
        wa_output-urgrp = wa_qmur-urgrp.
        wa_output-urtxt = wa_qmur-urtxt.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
        READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = wa_qmih-iloan.
        wa_output-tplnr = wa_iloa-tplnr.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM it_output  COMPARING        qmnum
                                                                  equnr
                                                                  ausvn
                                                                  ausbs
                                                                  auztv
                                                                  auztb
                                                                  iwerk
                                                                  qmtxt
                                                                  indtx
                                                                  priok
                                                                  strmn
                                                                  strur
                                                                  ltrmn
                                                                  ltrur
                                                                  vkorg
                                                                  vtweg
                                                                  spart
                                                                  parnr
                                                                  parvw
                                                                  arbpl
                                                                  ktext
                                                                  fecod
                                                                  fegrp
                                                                  urcod
                                                                  urgrp
                                                                  urtxt
                                                                  tplnr.
    *CALL FUNCTION 'STATUS_TEXT_EDIT'
    EXPORTING
      CLIENT                  = SY-MANDT
      FLG_USER_STAT           = ' '
       objnr                   =
      ONLY_ACTIVE             = 'X'
       spras                   = en
      BYPASS_BUFFER           = ' '
    IMPORTING
      ANW_STAT_EXISTING       =
      E_STSMA                 =
      LINE                    =
      USER_LINE               =
      STONR                   =
    EXCEPTIONS
      OBJECT_NOT_FOUND        = 1
      OTHERS                  = 2
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *CALL FUNCTION 'READ_TEXT'
    EXPORTING
      CLIENT                        = SY-MANDT
       id                            =
       language                      =
       name                          =
       object                        =
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
    tables
       lines                         =
    EXCEPTIONS
      ID                            = 1
      LANGUAGE                      = 2
      NAME                          = 3
      NOT_FOUND                     = 4
      OBJECT                        = 5
      REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *LOOP AT IT_OUTPUT INTO WA_OUTPUT.
    *WRITE : / WA_OUTPUT-qmnum,
             WA_OUTPUT-equnr,
             WA_OUTPUT-iloan,
             WA_OUTPUT-ausvn,
             WA_OUTPUT-ausbs,
             WA_OUTPUT-auztv,
             WA_OUTPUT-auztb,
             WA_OUTPUT-qmtxt,
             WA_OUTPUT-indtx,
             WA_OUTPUT-strmn,
             WA_OUTPUT-strur,
             WA_OUTPUT-ltrmn,
             WA_OUTPUT-ltrur,
             WA_OUTPUT-objnr,
             WA_OUTPUT-arbpl,
             WA_OUTPUT-parnr,
             WA_OUTPUT-parvw,
             WA_OUTPUT-objid,
             WA_OUTPUT-ktext,
             WA_OUTPUT-fecod,
             WA_OUTPUT-fegrp,
             WA_OUTPUT-urcod,
             WA_OUTPUT-urgrp,
             WA_OUTPUT-urtxt,
             WA_OUTPUT-tplnr.
    *ENDLOOP.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                    =
          filename                        = 'E:\CRM1.TXT'
      FILETYPE                        = 'ASC'
      APPEND                          = ' '
         write_field_separator           = '|'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
        TABLES
          data_tab                        = it_output
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on iTunes, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything, how can I stop this. please help!thx

    Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on Account, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything that is on my computer, how can I stop this. please help! please help!!!!!!thank you

    Is the iPod still singed into the account isn Settings>iTunes and App Stores and SettingsZ>iCloudl? If it is then I would not be concerned.
    Also see:
    iTunes Store: Associating a device or computer to your Apple ID
    since you may have started the 90 day window.
    For the other "problem", go to iTunes>Preferences>Devices and check the box that says Prevent iPod....automatically syncing.

  • I intended to install windows on my macbook, but I removed Mac os X wrongly! Now I don't know how to install Mac again please help me.

    I intended to install windows on my macbook, but I removed Mac os X wrongly! Now I don't know how to install Mac again please help me.

    I still don't know which version of OSX you have but assuming it's 10.7 or 10.8 .....
    You need to press command-R (at the sound of the chime) to get into recovery, try that, if it does not work try command-option-R for Internet Recovery.

  • How to remove duplicate songs from Itunes

    I've consolidates my music in Itunes 11.01. Playlists are just getting crazy with duplicates.
    I want to eliminate duplicate music files, as well as eliminate the references in the interface.
    Then sync my new IPad.
    When I manually erase a duplicate in Windows Explorer, I'm left with a "!" indication in Itunes that the file cannot be found... duh.
    I want to find either an easier way to eliminate duplicates without Windows Explorer, or
    a way to select all the "!" references in Itunes interface and delete.
    Help please from a completely organized person who hates Apples "intelligence" at thinking it knows what I want, and not providing
    adequate help under "remove duplicates" in its help index.
    Thanks.

    How to find and remove duplicate items in your iTunes library - http://support.apple.com/kb/HT2905
    Posts by turingtest2 about different types of duplicates and techniques - https://discussions.apple.com/thread/3555601 and https://discussions.apple.com/message/16042406 (Note: The DeDuper script is for Windows).
    May 2014 post on iCloud duplicates - https://discussions.apple.com/message/25867873
    Show exact duplicates (Mac and Windows) - https://discussions.apple.com/message/16951281
    http://dougscripts.com/itunes/itinfo/dupin.php (commercial)
    iTunes Duplicate Song Manager - http://sourceforge.net/projects/itunesdsm/
    http://www.hardcoded.net/dupeguru_me/
    http://www.wideanglesoftware.com/tunesweeper/index.php
    http://www.araxis.com/find-duplicate-files (commercial, free trial) - finds duplicate files on computer, not specifically iTunes
    I would do it manually.  As you can see from turingtest2's post, some duplicates are not really duplicates.
    I would also review how you add media to iTunes.  It should not be producing all that many duplicates.

  • How to remove duplicate template names in central admin - Sharepoint 2013

    Hi Guys,
    I can see some duplicate site templates in central admin (SharePoint 2013).
    How can i remove it? Please help me out on this.
    Regards,
    Krishna

    Hello,
    As there are many duplicate templates you could try below two steps.
    1) Find the templates :
    # Find the template name of SharePoint site using PowerShell
    $web = Get-SPweb <Site Url>
    Write-host “Web Template:”
    $web.WebTemplate ” | Web Template ID:”
    $web.WebTemplateId
    $web.Dispose()
    # To get a list of all web templates, use the following PowerShell code
    function Get-SPWebTemplateWithId
         $templates =
    Get-SPWebTemplate | Sort-Object "Name"
         $templates |
    ForEach-Object {
    $templateValues = @{
         "Title" =
    $_.Title
         "Name" =
    $_.Name
         "ID" =
    $_.ID
         "Custom" =
    $_.Custom
         "LocaleId" =
    $_.LocaleId
    New-Object PSObject -Property
    $templateValues | Select @("Name","Title","LocaleId","Custom","ID")
    Get-SPWebTemplateWithId | Format-Table
    2) Remove the ones you want to
    $templateTitle = "TitleOfTemplateToBeZapped"
      $site = Get-SPSite <Site coll url>
      $templates = $site.GetWebTemplates(1033)
    #lcid, 1033 = U.S.    $badTemplate
    = $templates | where { $_.Title
    -eq $templateTitle }
      if ($badTemplate
    -ne $null) {
        # the hidden feature Id is the first part of the template 
        #    name for custom web templates
        $id = $badTemplate.Name.substring(0,
    $badTemplate.Name.IndexOf("#"))
        $badId = [System.Guid]($id)
        $site.Features.Remove($badId)
        write-output "Template '$templateTitle' has been removed"
    } else {
        write-output "No template was found with the title of '$templateTitle'"
      $site.Dispose()

  • How to remove duplicates

    Hi
    i am removing duplicate records while importing bulk data into the table...I am checking for some columns...when they are same, i am removing the old records...i have used the following code to remove duplicates...
    execute immediate 'DELETE FROM test1 WHERE ROWID IN (SELECT ROWID FROM (SELECT ROWID,ROW_NUMBER() OVER (PARTITION BY c1,c2 ORDER BY 1) row_no FROM test1)WHERE row_no > 1)';
    here i check c1 and c2 columns...if they are same the old records are to be deleted...but in this code, the new records are deleted..can anyone say how to remove old duplicate records?
    Vally

    Hi
    i am removing duplicate records while importing
    bulk data into the tableWhat you mean by using "while"?
    During the process of importing(read inserting) - you want to delete duplicate records?
    As you say in the following you have C1 and C2 - using both of them - you find duplicates.
    I deem you have other columns besides C1 and C2. And these columns have different fileds in NEW record and OLD record - then why don't you use UPDATE statement?
    ...I am checking for some
    columns...when they are same, i am removing the old
    records...i have used the following code to remove
    duplicates...you should clarify on what criteria you separate old records from new records and place this condition in your query.
    E.g. you have a field DATE_OF_ENTRY
    and the latest one is the new record which shouldn't be deleted
    then you would be able to put it into your delete statement:
    DELETE FROM test1
    WHERE ROWID IN (SELECT ROWID
                       FROM (SELECT ROWID,
                                    ROW_NUMBER() OVER(PARTITION BY c1, c2 ORDER BY DATE_OF_ENTRY desc) row_no
                               FROM test1)
                      WHERE row_no > 1)

  • TS3999 how to remove duplicate Birthday entries in icloud on my PC

    how to remove duplicate Birthday entries in icloud on my PC
    The Birthday entries on my iPad are ok.

    Welcome to the Apple Community.
    The following article(s) may help you.
    Resolving duplicate calendars

  • Loacate and remove duplicate records in infocube.

    Hi!!
    we have found the infocube 0PUR_C01 contians duplicate records for the month april 2008, approx 1.5lac records are extracted to this infocube, similar situations may be occuring in the subsequent months.
    How do I locate these records and remove them for the infocube?
    How do I ensure that duplicate records are not extracted in the infocube?
    All answers/ links are welcome!!
    Yours Truly
    K Sengupto

    First :
    1. How do I locate duplicate records in an Infocube? other than down load all the records in an excel file and use excel funtionality to locate duplicate records.
    This is not possible since a duplicate record would not exist - the records are sent to a cube with a + and - sign to accordingly summarize data.
    You search for duplicate data would become that much troublesome.
    If you have a DSO to load it from - delete data for that month and reload if possible this would be quicker and cleaner as opposed to removing duplicate records.
    If you had
    ABC|100 in your DSO and it got doubled
    it would be
    ABC|+100
    ABC|+100
    against different requests in the cube - and added to this ill be your correct deltas also.

  • How to Remove Duplicates Without Changing Album?

    Hello All,
    I see a lot of topics on how to remove duplicate songs but there is one thing I would like to know if its possible...
    I would like to remove my duplicates but I still want to see the songs as part of the albums. Example: lets say the same song is present in 3 different albums. I would like to remove 2 of them but have them still showing up as part of the 3 albums. This way the albums remain "complete".
    Is there any way to tool available that can do that? Maybe keeping something like a symbolic link in place of the songs that were deleted?
    Any help would be appreciated.
    Thanks!

    Not possible and has been asked before.
    MJ

  • How to remove duplicate songs in iTunes?

    Please advise me how to remove duplicate songs in iTunes? Thank you

    THIS is how you remove them, Once you done this...Press and Hold Command on All Music and then Delete and your Done.

  • I have "@mail.ru" tool bar(i think) under the address bar. Its in a different language. I am not able to remove that. Please help me to remove that

    I have "@mail.ru" tool bar(i think) under the address bar. Its in a different language. I am not able to remove that. Please help me to remove that. Its not listed under 'Extensions', plug-ins,add-on too..
    Thanks

    Please look at another post I have just made relating to mail.ru, and post back with how you get on.
    * [/questions/924267#answer-323108] <-- clickable link -- (blue) --

  • How to avoid Duplicate Records  while joining two tables

    Hi,
    I am trying to join three tables, basically two tables are same one is like history table, so I wrote a query like
    select
    e.id,
    e.seqNo,
    e.name,
    d.resDate,
    d.details
    from employees e,
    ((select * from dept)union(select * from dept_hist)) d
    join on d.id=e.id and e.seqno=d.seqno
    but this returing duplicate records.
    Could anyone please tell me how to avoid duplicate records of this query.

    Actually it is like if the record is processed it will be moved to hist table, so both table will not have same records and I need the record from both the tables so i have done the union of both the tables, so d will have the union of both records.
    But I am getting duplicate records if even I am distinct.

  • Free cloud storage and unlimited access keeps popping up why and how to make it stop please help?

    free cloud storage and unlimited access keeps popping up why and how to make it stop please help?

    Safari
    Go step by by step and test.
      Quit Safari.
      Force Quit if you have to.
      Hold the shift key down and relaunch Safari.
    Reset Safari.
    Click Safari in the menu bar.
    From the drop down select "Reset Safari".
    Uncheck the boxes beside  all items.
    Just check the box beside “Remove all website data”.
    Click "Reset".
    Empty Caches
    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    Develop menu will appear in the Safari menu bar.
    Click Develop and select "Empty Caches" from the dropdown.
    Turn off Extensions if any, and launch Safari.
    Safari > Preferences > Extensions

  • My 5 yr old accidently purchased monies on a game what can i do to remove it ? please help it cost 99.00

    my 5 yr old accidently purchased monies on a game what can i do to remove it ? please help it cost 99.00

    Read this, it explains how you could have set restrictions and avoided this situation:
    http://manuals.info.apple.com/en_US/iPhone_iOS3.1_User_Guide.pdf#page146

Maybe you are looking for

  • How to activate a pen tablet on photoshop on a All-in-one computer [touch screen]?

      I have a all in one computer touch screen- and I can use a pen tablet right on the screen, it's active- but when I go on PSCS6 and try to use the pen tablet, it is not active onto the screen- where do you go to activate it?? Can you?

  • Second Display Size with 24" iMac?

    I have a new 24" iMac and currently using a 22" Dell Monitor as a second. However, I'm wanting to get one that will sit better next to the iMac. It doesn't really need to be the exact same size, but I'm looking for it to sit perfect next to the iMac

  • WebCenter Preview

    I have an Oracle license and downloaded Oracle 11 Technology Preview 4. I wanted to test the WebCenter functionality. However, I was using the tutorial for 10.1.3.2 and based upon it I do not see the WebCenter functionality. I read the website for Or

  • Photo albums order

    When i first got my iphone i added about 7 folders and they were listed in alphabetical order...i just added another 5 folders but there listed in alphabetical order, behind the first batch of folders...how do you list them all in alphabetical oder..

  • Mac pro 1.1 upgrade ?

    I have a 2006 mac pro 2.66 dual core which I've been very fond of... I am thinking about buying a macbook  pro to replace mac aging mac pro. I do light video editing, photoshop and light gaming on a 30" Apple monitor. .  Want to keep the cost down to