Delete only if these are consecutive


Hi all

I want to calculate only consecutive duplicates only. Normal thing I am able to do using rownum. But

CT BBC (EMPNO INTEGER, CODE VARCHAR2 (10) DATE OF DW_EFF_DT)

INS IN BBC VALUES(1,'A','2014-01-01');

INS IN BBC VALUES(1,'B','2014-01-05');

INS IN BBC VALUES(1,'A','2014-01-10');

INS IN BBC VALUES(1,'A','2014-01-20');

I want to calculate the minimum eff_dt for duplicates. But here I need todo only if these are consecutive.

As

1, 'A','2014-01-01'

"1, 'B','" 2014-01-05

1, 'A','' 2014-01-10

Concerning

KVB

Hello

When you say "delete", you mean really DELETE, or do you mean "no display"?

Assuming that code cannot be NULL:

WITH got_prev_code AS

(

SELECT empno, code, dw_eff_dt

AS prev_code TROLLING (code) OVER (ORDER BY dw_eff_dt)

BBC

)

SELECT empno, code, dw_eff_dt

OF got_prev_code

WHERE prev_code <> code

OR prev_code IS NULL

;

If you would care to post CREATE TABLE statements INSERT to your sample data, then I could test this.  Make sure that you are trying to INSERT a string, such as '' 2014-01-01 into a DATE column.

Tags: Database

Similar Questions

  • Why my actions keep deleted? When I open Photoshop save the only actions that are there are my first I watched with little action and duplicates of them each time.

    I have adobe Photoshop CS6 and whenever it stops when I go to open the program again my actions aren't there. The only ones they are on my original actions that I started with. These actions are also doubled. I have three of them, and I have to go and delete them every time. But I have many more shares that I used to have in Photoshop and they are is no longer there. I have to keep their reopening every time. Someone know why she would do that because it's very frustrating when I go to edit photos and I need to get my actions again, and then open them upward.

    Maybe a permissions issue, see this link for general troubleshooting techniques for Photoshop:

    t http://blogs.Adobe.com/Crawlspace/2012/07/Photoshop-basic-troubleshooting-steps-to-fix-MOS - issues.html

  • I can't delete photos and other files. These are my own files and they are not open on the computer.

    Of recent, I am unable to delete files or photos.
    These are my own files.  They are not in use elsewhere on the computer.
    When I try to delete, the Microsoft 'circle work' rises and lasts forever.
    I can't get out of this mode.  Finally, after trying to escape from this command, the box comes in asking me if I really want to delete the file.
    How can I get my computer to normal operation removing?

    ......... Of recent, I am unable to delete files or photos.

    Consider a problem in recebt?

    If Yes, do you remember a "good date" when you could remove personal files?

    If Yes, please do a system restore.
    Choose this "good date" or before as your restore point.

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    If system restore is not working or not a option, please do a check of the file system. It's to look for corrupt files. He will try to fix it if it is found.

    http://www.Vistax64.com/tutorials/66978-system-files-SFC-command.html

  • Edition-&gt; delete only delete area selected percentage of opacity.

    Edition-> delete only delete area selected percentage of opacity.

    I want to make clear can easily remove the whole pixels in the selected area.

    Where can I change the value?

    Sorry for my English.

    You can use the selection tools and press DELETE to delete the pixels. To reduce the opacity of select the area can move this area into a new layer, and then adjust the opacity of the layers.

    Or better yet, select the area to apply a mask to this layer. The mask will determine what is hidden and what is reduced opacity, leaving all on the same layer. With the mask, you can use the Brush tool to paint between (hidden) black to white (visible) and grey are the steps of opacity.

    This means that you can also use gradients or filters on this mask.

    If a search on google for layer masks or the opacity mask to provide assistance.

    If this is not the case, let us know.

  • delete only certain set of lines

    Hello

    I would like to delete acertain all lines of my tableA that has these 2 values as

    Industry-> APAC
    Region-> all THE


    remove from TABLEA
    where there are
    (select the industry, region)
    from TABLEA
    where substr (tableb_fk, 1, 2) = "AB".
    and the value is null
    Industry group, region);

    The select query returns the set.i.e. 1 row
    But this will remove the entire tableA I want to delete only the lines where I have industry-> APAC and region-> all THE. But I don't want to hard-code the value.
    It must come from a select query.

    Thank you
    DELETE FROM TABLEA WHERE (INDUSTRY,REGION) = (select industry,region from TABLEA where substr(tableb_fk,1,2)='AB' and value is null
    group by industry,region)
    
  • Cannot delete the file - paths are too long

    Trying to delete a folder.  He complains that the folder contains items whose names are too long for the Recycle Bin.

    The problem I think is that this folder is a backup copy of an old folder AppData, in which it seems to be an almost infinite folder "Application Data" series - I am sure that these are in fact the links as opposed to records, but there is a huge tree full of them.  At the end of some branches, there are some 'real' files, but then several sub-branches of Application Data files.

    So I guess that when I try to remove the top-level folder, the full path to the way in which the files down is just too long.

    When I shift-DELETE, nothing happens, and I tried to remove it from the command prompt, nothing helps.

    Don't know what to do next.  I want to just get rid of the folder tree.

    Mike

    OK, well, irritating as it is that there is no apparent way to force Vista to do, I just crossed the entire folder structure and renamed each 'Application Data' folder to 'a', to shorten the overall paths, and this then allowed me to remove the top-level folder.

    Mike

  • How can I see only new topics areas on a single page?


    I was wondering how I can make the start

    For example, Im interested only in the database space and that in many areas secondary like high availability, upgrade, general.

    So, I would like to see the new subjects in these areas on a single page. How can I do this?

    Currently, in order to check the news issues, I need each time to go to each section, and then select subset, go back, select a different subspace. It is very awkward, slow and takes the resources of the server.

    Concerning

    Ed

    You must select Track in Communications under Actions in view overall of the appropriate forum area that interests you. You should then receive notifications in respect of Communications and filter in "unread". If you don't want e-mail notifications, you need to trigger in your user preferences. For more detailed information, see my previous post here:

  • Oh noCRS-4258: adding and deleting files from voting are not allowed because

    Hi RAc sheet...

    whoat do now?


    CRS-4258: adding and deleting files from voting are not allowed because the files with voting rights are on ASM

    Oralce 11 GR 2 aix cluster with Asm...

    Hello Hagggy

    Something's still bothering you? Why always having these problems? Unfair or just good enough to get all ask them...

    Sorry don t be offended, we will do better... Attached a solution that could work, you may need to change some parts I'm not sure you need to move the voting too...

    First take a deep breath of fresh air and take a backup also

    /U01/11.2.0/grid/bin/ocrconfig - manualbackup

    create a fake vote of the volume of the DSO.

    CREATE DISKGROUP FAKE_VOT NORMAL REDUNDANCY
    FAILGROUP failure_group_rup DRIVE
    ' / dev/rfake_vot "vo1_rup1 NAME
    FAILGROUP failure_group_bry DRIVE
    ' / dev/rfake_vot_2 "vo1_rup2 NAME
    ;

    /U01/11.2.0/grid/bin/crsctl add css votedisk FAKE_VOT

    CREATE DISKGROUP PPR_VOT_OCR NORMAL REDUNDANCY
    FAILGROUP failure_group_rup DRIVE
    ' / dev/rhdisk13 "VOT_OCR_rup1 NAME.
    ' / dev/rhdisk15 "VOT_OCR_rup2 NAME
    FAILGROUP failure_group_bry DRIVE
    ' / dev/rhdisk14 "VOT_OCR_bry1 NAME.
    ' / dev/rhdisk16 "VOT_OCR_bry2 NAME
    FAILGROUP QUORUM fg3 DISK ' / dev/rhdisk17 "NAME QRM_VOT_OCR_BAL
    ATTRIBUTE 'compatible.asm' = ' 11.2.0.0.0 ';

    /U01/11.2.0/grid/bin/crsctl replace votedisk + PPR_VOT_OCR

    /U01/11.2.0/grid/bin/ocrconfig-Ajouter + PPR_VOT_OCR

    /U01/11.2.0/grid/bin/ocrconfig-Supprimer/dev/rfake_ocr

    get the new volume or diskgroup to pass to love

  • When I play scrabble, I want TO be able to access the dictionary and two-letter words. These are blocked. How to stop blocking?

    Once again! When I play scrabble I want to be able to go to the dictionary and two letters of words when I play the game - these are blocked much to my aggravation! How to stop blocking?

    Hmm, this site is this game on?

    Is the part of the dictionary of the same page, or a separate page/add on in Firefox, or a completely separate program?

  • permanently delete messages "additional plugins are required to display all the media on this page.

    Delete message "additional plugins are required to display all the media on this page" permanently. I have no use for ANY Adobe product, either. None are allowed on my network, period. I'm tired of this message. The absence of the FLASH plugin is what triggers it. However, the absence of the plugin is a good thing and that the plugin is totally unnecessary and absolutely not desired.

    You can inspect and change this pref on the subject: config page.

    • the pref plugins.hide_infobar_for_missing_plugin true value
  • When the progressions referred to my Office I get two icons, one is a file folder, when I try to delete this two icons are removed

    When the progressions referred to my Office I get two icons, one is a file folder, when I try to delete this two icons are removed from the trash how to solve?

    When the progressions referred to my Office I get two icons, one is a file folder, when I try to delete this two icons are removed from the trash how to solve?

    So if you right-click on the desktop and choose New--> shortcut and then create a shortcut to something, what is happening?

  • Calendar view-only and users are unable to change the time.

    We use Windows Server 2003 R2 active directory and group policy.

    Group Policy, we blocked sytem time change but after this timetable can also test block user cannt read calander also

    pls sugget me to resolve this issure

    Calendar view-only and users are unable to change the time.

    Hi sunil77,

    Your question about changes in UAC using Group Policy on Windows Server 2003, it will be better answered by the experts in the Group Policy Forum. Please repost your question to the address provided.

  • My WMP11 icons are missing. WMP11 plays and works well. Only the icons are missing in the quick launch of office and almost everywere else.

    Original title: WMP11 missing icons

    My WMP11 icons are missing. WMP11 plays and works well. Only the icons are missing in the quick launch of office and almost everywere else. My "Hide inactive icons" is always disabled. How can I restore them?

    WinXP2002 Home Edition with Service Pack 3.

    Hi, Billgoats,

    Try to rebuild the icon cache:

    Right-click on command prompt and select run as administrator
     
    Type the following command:
     
    C:\Users\\AppData\Local (put your username in where ProfileName is)
     
    Press enter
     
    Type:
     
    attrib-h IconCache.db
     
    Press enter
     
    Type:
     
    Del IconCache.db
     
    Press enter
     
    Type:
     
    Start the Explorer
     
    Press enter
     
    Type:
     
    Output
     
    Press enter

  • A large number of messages I put in the folder deleted in my email are missing when I go to pick up at a later date

    original title: remove folders

    I have Vista with Windows Mail.  A large number of messages I put in the folder deleted in my email are missing when I go to pick up at a later date.  How can I get back them?

    Windows Live Mail

    The difference. Wrong forum.

    Windows Live Mail Forum
    http://www.windowslivehelp.com/forums.aspx?ProductID=15

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • When you perform an adjustment in RAW, when I brush to select the area I want to solve, she brushes only above certain areas look blurred/pixely mask

    When you perform an adjustment in RAW, when I brush to select the area I want to solve, she brushes only above certain areas look blurred/pixely mask

    Have you checked auto mask?

Maybe you are looking for

  • Search Excel

    Hello all I am in need of some advice (again) and would appreciate any assistance. Attached is the file "2010-06-01. The file is downloaded from a webbox which is used to collect data from a solar plant. The webbox can capture data from any number of

  • Questions all-in-one Photosmart C5580 than a cartridge message is incorrect

    Cannot print because of the message that a print cartridge "is not intended to run on this printer. the cartridge in question is the right cartridge HP C5580, has sufficient ink tank and had not been affected before the message that appears. No chang

  • For Windows Vista experience Index will be updated to reflect the Wei even than Windows 7?

    Original title:SCORE OF BASIC WINDOWS 7 EXPERIENCE INDEX OF 7.9 I HAVE WINDOWS VISTA ULTIMATE 64 BIT. AND THE BASE SCORE IS 5.9 ON ALL LEVELS! HAVE YOU TRIED WINDOWS 7 RC AND THE BASE OF THIS SCORE WAS 7.9 AT ALL LEVELS! YOU DO AN UPDATE FOR THIS PRO

  • I pressed a combination of alt shift and ctrl

    or something like that-I'm not too sure, but the point is that everything on the screen is super HUGE! Ive tried everything (or so I think) and its extremely frustrating! ): I could really use some advice on what to press or to fix this problem, it w

  • Woke up this morning to my laptop completely missed?

    Woke up this morning to find everything on my computer files, to the background image, Internet, browsers, to all the default Favorites to a normal state with the text "you have been connected with a temporary profile. What happens here?