Select only the lines with the duplicate data in columns

Hello

I try to find roles here in duplication.  I created a script for me the employee, the name of the State, the title of the post, the end date and the union_id.

Select
p.emp_no,
p.Surname | «, » || p.Forenames,
p.person_status,
j.job_title,
j.end_date,
j.union_id

person p
inner join appointee_history ah on trim (ah.emp_no) = trim (p.emp_no) and ah.change_date = (select max (change_date) in the appointee_history where ah.emp_no = emp_no)
join in-house job j on trim (j.job_title) = trim (ah.job_title) and trim (j.org_unit) = trim (ah.org_unit)
where j.change_date = (select max (j2.change_date) of j2 work
where trim (j2.job_title) = trim (j.job_title) and trim (j.org_unit) = trim (j2.org_unit))

and p.person_status like 'a % '.
and p.emp_no not like 9% '
and j.union_id is not null
order of j.union_id

However, I'm looking only for duplication through the union_id. I tried a having count (*) > 1 but the emp_no is configured to be separate, and I get and not a single - group function error.

Can anyone recommend a way to do this please?   I would be very grateful.

Hello

2729819 wrote:

...  So the expected results.

See you soon

This is what produces the query I posted earlier, if you use the new table and the columns and (unlike me) come out MORE correctly:

WITH got_cnt AS

(

SELECT emp_no

person_status

function

union_id

COUNT AS NTC (*) OVER (PARTITION BY union_id)

SAMPLE

)

SELECT person_status, emp_no, union_id, function

OF got_cnt

WHERE cnt > 1

ORDER BY union_id

;

You can get the same results with the COUNT aggregate function, but it should be faster, because it requires only a single pass through the table.

Tags: Database

Similar Questions

  • Select only the objects in a rectangle selection

    I am a new user of Illustrator CS5, switching from Freehand. I'm trying to find out if there is a way to select only the objects in a marquee? In AutoCAD, you can make a selection on the left window to the right and only those objects entirely in the window are selected. If you the window right on the left all the objects that are "crossed" or affected by the window are selected. Is there a similar technique in Illustrator?

    Currently, I have to select the objects, and then go back and hold the SHIFT key to deselect the object I don't want, or place objects on different layers and then lock the layers to prevent additional items get selected.

    In AutoCAD, my main program, you simply draw a window selection, left or right, depending on what your next step would be. No special tools or rocking or thinking, that's just the selection primary process and very intuitive.

    I posted a discussion on the Illustrator forum several months ago, which still arouses comments so this seems to be a tool that would be appreciated by many users. Someone posted a script but it has not worked for me yet.

    Thank you for everything that you can do to solve this problem.

    This is a copy of my last post of the original thread. I found some discussions confused because I have no experience in writing or by using scripts. So I copied all the recommendations in a document to read without the comments and digressions. After several hours and a lot of searching on Google I found what solution adapted to my goal, which was a selection process fast and simple with fewer steps to use.

    So, I think I have this job. The following is what I did:

    1 copy the script by Carlos Canto post #11 here:

    http://forums.Adobe.com/thread/856221?start=0&TSTART=0

    2. open the ExtendScript Toolkit Utilities > Adobe utilities - CS5.5 > ExtendScript Toolkit CS5.5 > ExtendScript Toolkit CS5.5.App

    3. when the program opens, paste the script in the large Panel on the left.

    4. then go to file > save as.

    5. that the dialog box click on the arrow next to the save box slot to expand the section options.

    6. next, go to Applications > Adobe Illustrator CS5.1 > Presets > en_US > Scripts.

    7. then, in the Save as box enter a name to identify the script (I named mine Window1).

    8. click on save and close the Toolbox.

    Launch Illustrator and open a drawing.

    1 using the rectangle tool, I drew a rectangle around the objects.

    2. make sure that the new rectangle is selected.

    3. I went to file > Scripts > Window1.

    4A got an error message - error 8705: target layer cannot be changed 25-> iart.selected + true line:

    Oops, you must have ALL unlocked layers.

    5. you click OK.

    6 unlocked all the layers.

    7. my new activated rectangle.

    8. went to file > Scripts > Window1.

    9 here! Items in the rectangle are selected and the rectangle is removed.

    So yes, this script works as requested. Thank you, Carlos.

  • How to select only the URLS in the same page

    I'm used to be able to select only the URL with right click of the entire page. After reinstalling Firefox, I can't use this feature more. Please let me know what kind of add-on, I need to have. Thank you

    I looked in the Wayback Machine for an older version of this page. He said:

    Multi links allows you to open, copy or favorite of several links at the same time rather than having to do them all individually.

    To open, links copy or bookmark, you simply right-click and do to drag a rectangle around the links to the desire to act. When you release the right mouse button, you will open/copy/bookmark these links.

    Note: The Wayback Machine does not cache downloads real extension due to the limitations of robots.txt on the site of modules.

    One of these current extensions could be partial replacement:

    I have not tried any of them myself.

  • I'm trying to create one named calculation in a field, but not able to select only the required fields, other than all or not.

    Hi all

    I installed "Acrobat Standard DC".

    I've been working on a PDF file to filliable form.

    Then tried to make a calculation in a field, but wasn't able to do.

    When you set up, I was not able to select only the necessary fields.

    field-select_0.pngfield-select_1.png

    I have only be able to select all or not!

    Is that what I'm doing wrong?

    Even trying in "simplified... field. "it doesn't work.

    Thanks for any suggestions!

    Use the space bar to select a single box.

    Wednesday, July 29, 2015, at 14:16, supporth66519991 [email protected]>

  • Filter in adobe bridge to select only the Raw files to DNG format convert

    Here's my problem - I have a new camera DMC TZ70 and 5.7 Lightroom does not recognize the. RW2 files. I would need to buy LR6! Maybe later.

    So I thought that I import via the bridge and convert to DNG.

    So I open the bridge, and then select the camera - great - BUT there are files for Raw, the same number of JPEG files images and some .bdm. TDT etc files. (for example 3 raw + 7 others).

    I can set up a filter to Show only Raw files when I see what files are in the folder of the card at the Bridge, but when I select "get photos from camera" I can either select all OR deselect and then I need to MANUALLY select raw files. There seems not to be a way to set up a filter in the form of Downloader so that bridge selects only the Raw files for conversion.

    If I left it all, Bridge Converts the RW2 in DNG files, but also provides in the JPGs and other files. I can delete these later, but this seems an inefficient way to do it.

    Is it possible to manually select raw files in the form of Photo Downloader?

    Advice please, thank you, Mel

    I guess the answer's bridge doesn't do what I want, but not Lightroom - bought LR6

  • Why is there not an option to print only the form data in Adobe XI?

    I created a form in Adobe Acrobat Pro XI and saved.  So I want to open it in Adobe Reader, fill it in and then print only the data from the form, but it is not an option to print only the form data in Adobe Reader XI.  I don't know if it's in the way I created the form or something else.  Any help will be greatly appreciated.  Thank you!

    Adobe is a software company, unless you are a builder.

    Player cannot directly print the form data.

    The ability to print the form data only exist in Acrobat Professional and Acrobat Standard. To purchase the full product provides more bang for the buck.

  • How to select only the objects in a marquee?

    I am a new user of Illustrator CS5, switching from Freehand. I'm trying to find out if there is a way to select only the objects in a marquee? In AutoCAD, you can make a selection on the left window to the right and only those objects entirely in the window are selected. If you the window right on the left all the objects that are "crossed" or affected by the window are selected. Is there a similar technique in Illustrator?

    Currently, I have to select the objects, and then go back and hold the SHIFT key to deselect the object I don't want, or lock layers to prevent additional items get selected.

    NO.

  • Separate with a nclob data type column

    I came across a scenario where we need to extract data from a table that is having a NCLOB data type column.

    Now, the challenge is coming we need to extract only the separate data including NCLOB column of this table type.

    It is showing following error.

    ORA-00932: inconsistent data types: expected - got NCLOB

    1. 00000 - ' incompatible data types: wait %s %s got. "

    * Cause:

    * Action:

    Error on line: column 3:16

    Any suggestion would be appreciated.

    There are several options, such as using dbms_lob.substr or similar functions:

    CLOB DISTINCT column value

    (Kepp hash collusion in mind ;-)

    Depends on your actual data I guess.

  • Can I use automatically select only the first line of a legend to include in the list of Figures?

    Is there a setting in the FAKE ID CS6 utility that will allow me to use only the first sentence in a legend to include in a list of numbers?

    Example of

    Willard Wharf, Cocoa, Florida, 1887.   It was the first blah blah blah of cocoa.  Photo by a dead guy.  with the permission of a lovely old lady whose grandmother collected it.

    In the example above, the whole passage is currently formatted with a paragraph style sheet in the Arno Pro Caption.  When I'm done, I would like to have this first phrase or sentence in "BOLD", which I planned to do with a character style sheet.  The rest will be normal.

    Now I understand more how the TOC utility works, I wonder, can I do a paragraph for the sentence of the title style and a second paragraph style for the remaining text in the legend that follows in the affirmative, how to make sure that the second paragraph will follow on the same line where ever the first paragraph style ends?  Nested styles, perhaps?  If the nested styles are the way to go, any comments or pointers to the simplest strategy to do this work will be appreciated.

    Legends do not match.  Some have a name and date; others are a title phrase or sentence, follow, sometimes up to several sentences.  In General, however, there is only one sentence after the title. I also usually a "courtesy of...". "statement recognizing the source of the photo.

    I'm a newbie using id cs6, for the first time, to format a book.  I'm enjoying using the program, but some details lead me sometimes at a stop.

    Thank you

    Roy

    If the TOC utility will choose paragraph or character style?

    If so, I'm good.  But the instructions in the site of Adobe and 2 manuals that I speak using paragraph styles.  The ones of my choice list.  Will have to do an essay on character styles.

  • Select only the layers highlighted?

    Is it possible to get to the level of the layers only highlight?

    For example, I want to get an object/array that contains only the layers highlighted in blue:

    Screenshot 2015-12-20 21.40.27.png

    I'd rather not select the work to achieve this.

    Thank you!

    M

    This gives a shot.

    It will leave you with a table containing the layers you had selected in the layers panel when the script is run.

    You can see the bottom I loop this table so you can see each name and origin of visibility

    function get_selected_layers(){
        var doc = app.activeDocument;
        var lays = doc.layers;
        var OriginalLayers = [];
        for(var i = 0; i < lays.length; i++){
            OriginalLayers.push(lays[i].visible);
            if(!lays[i].visible){
                lays[i].visible = true;
            }
        }
    
        make_action();
    
        var SelectedLayers = [];
        for(var i = 0; i < lays.length; i++){
            if(lays[i].visible){
                SelectedLayers.push(lays[i]);
            }
        }
    
        for(var i = 0; i < lays.length; i++){
                lays[i].visible = OriginalLayers[i];
        }
    
        return SelectedLayers;
    
        function make_action(){
            // Set you action name and the set name that it belongs to here
            var myAction = "Select_Layers";
            var mySet = "Scripted_Actions";
            //---------------------------------------------------------------------------------
            var currentInteractionLevel = app.userInteractionLevel;
            app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
            var actionStr = [
                '/version 3',
                '/name [ 16',
                '53637269707465645f416374696f6e73',
                ']',
                '/isOpen 0',
                '/actionCount 1',
                '/action-1 {',
                '/name [ 13',
                '53656c6563745f4c6179657273',
                ']',
                '/keyIndex 0',
                '/colorIndex 0',
                '/isOpen 0',
                '/eventCount 1',
                '/event-1 {',
                '/useRulersIn1stQuadrant 0',
                '/internalName (ai_plugin_Layer)',
                '/localizedName [ 5',
                '4c61796572',
                ']',
                '/isOpen 0',
                '/isOn 1',
                '/hasDialog 0',
                '/parameterCount 3',
                '/parameter-1 {',
                '/key 1836411236',
                '/showInPalette -1',
                '/type (integer)',
                '/value 7',
                '}',
                '/parameter-2 {',
                '/key 1937008996',
                '/showInPalette -1',
                '/type (integer)',
                '/value 23',
                '}',
                '/parameter-3 {',
                '/key 1851878757',
                '/showInPalette -1',
                '/type (ustring)',
                '/value [ 11',
                '48696465204f7468657273',
                ']',
                '}',
                '}',
                '}'
            ].join('\n');
            createAction(actionStr);
            app.doScript(myAction, mySet, false);
            actionStr = null;
            app.unloadAction(mySet,"");
            app.userInteractionLevel = currentInteractionLevel;
        }
    
        function createAction (str) {
            var f = new File('~/ScriptAction.aia');
            f.open('w');
            f.write(str);
            f.close();
            app.loadAction(f);
            f.remove();
        }
    }
    
    var myLayers = get_selected_layers();
    for(var i = 0; i < myLayers.length; i++){
        alert(myLayers[i].name + ", " + myLayers[i].visible);
    }
    
  • Financial reports _ refer only the CANCELLED data cell

    Hello

    In a financial report there is 2Dims in the columns

    ColA = members of the market level 0 (zeros & missing are deleted)...

    Cold = same as ColA (I want to refer only to the members of the Level0 CANCELLED de ColA market)


    I can't take the market level 0 members in the cold because there are 1 more DIM in collars and requirment is to have only the Unsuppressed level 0 members of the ColA market.

    I want to refer only to the members of the Level0 CANCELLED de ColA market?


    Is it possible to do so.

    Receive your answer.

    Grid1_:

    Since 903, 903-48, 903-48/24 is more single members, they do not expand in what either as Lev-0.
    So for these members, you can build hierarchy by urself by GetHeading. (i.e. by plurarite of the market to the rank column heading)

    So you can have 3 columns each for 903, 903-48, 903-48/24.
    and have lines in the market and control the markets in advance i.e. suppresssion delete if Col (903-48/24) contains no data. So it was you will get relevents worked for you. but you show in this grid, data shows data 903 in the first column.
    If that way you get solution to 903. Likewise, it can be done 903-48, 24 / 48/903

  • Extra page prints when I print selects only the pages in a pdf

    When I have a several page pdf and I want to print less than the full document, my print job always starts on an extra blank page at the end. If I print the entire document, it does not generate an additional page. I've tested this in Word and Word prints only the pages with none of the additional pages.

    Any ideas what the problem may be?

    Thanks for your help.

    Sorry I'm late getting back. I solved the problem, so in the interest of those who may encounter this problem later, I write I find the solution.

    I tried your suggestion first and second. None worked. I could not try the third suggested fix that I'm on a work computer and apparently did not have the administrative rights to create a new user account (at least, I couldn't figure out how to do).

    After a lot of digging and experimenting, here's what has worked in the end.

    Start > devices and printers > right click on the printer > printer properties > Advanced tab > uncheck "Enable advanced features of print" > apply > OK.

    I have determined that, somehow, it was a problem of separator page, but it's the only way I could find to disable the separator page.

    Hope this helps someone in the future.

  • How to select only the part by using the sql query

    Hello

    I have the task to retrieve only the integral of the input text by using the sql query.

    The entry is as follows

    Entry for the price setting

    $12.5 (FYI without space)

    $ 12.5 (FYI single space)

    $ 12.5 (double space FYI)

    $12.5 (FYI multiple space)

    $12.5 (FYI multiple space)

    Output expected of 12.5

    The price is the type varchar2 column in the store_price table.

    Please let me know how to achieve this.

    Thanks in advance.

    If this is always the case that you get a $ followed by a number of places, you can use something like:

    Select to_number (ltrim ('$ 12.5',' $')) DOUBLE

    or

    SELECT ltrim ('$ 12.5',' $') OF double

    but take care of your nls_numeric_character settings if they are defined so that, for example, a comma is the decimal separator, you will have a problem.

    HTH

  • How can I select only the lowest layer?

    On the Adobe site, he States:

    If you need the lowest layer selected, press Option + shift + -[.]

    Well, it does not work for me in all cases as if another layer is selected, both end up being selected.

    Inside of an Action, how can I select the lowest layer and only the lowest layer?

    And while I ask questions of Action, in an existing action, how do I start recording so that the new shares are placed right at the top? If I select the name of the Action, the new record is placed in the lower part. If I select the first element, the new record is ranked second.

    See if Option +, (comma) selects the lower layer.

    And Option +. (period) selects the top layer.

  • Link from Oracle to MySQL database select only one line

    Hello

    I created a connection to the batabase Oracle 11.2 to a MySQL database via a database link. The following statement shows that 35 lines are in the mySQL table:

    SQL > select count (*) from 'main_pages"@MOREWEB;

    COUNT (*)

    ----------

    35

    But a normal select statement only return 1 row.

    SQL > select 'subject' of 'main_pages"@MOREWEB;

    Object

    ------------------------------------------------

    Übersicht: references

    I use the mysql-connector-odbc driver - 3.51.30 - winx64. One is the newer version be installed because on Windows Server 2008 R2, I get an error with a missing dll file. The DataDirect ODBC driver is not possible, because we like to use the MySQL-database free one only support for DataDirect enterprise edition.

    I have also tried to limit the HS_OPEN_CURSORS or do not limit the HS_FDS_FETCH_ROWS, but there is no difference in the result. I always get only one line.

    HS Init.ora

    # This is an example of initialization file of the agent that contains the HS settings

    # necessary for the database to ODBC gateway

    #

    # HS init parameters

    #

    HS_FDS_CONNECT_INFO = moreweb

    HS_FDS_TRACE_LEVEL = WE

    HS_FDS_FETCH_ROWS = 1

    #

    # Required for the non-Oracle system environment variables

    #

    #set < varenv > = < value >

    HS trace file

    Oracle Corporation - MITTWOCH 5 November 2014 13:56:22.066

    Heterogeneous Agent release

    11.2.0.1.0

    Oracle Corporation - MITTWOCH 5 November 2014 13:56:22.066

    Version 11.2.0.1.0

    HOSGIP to 'HS_FDS_TRACE_LEVEL' returned 'ON '.

    HOSGIP to 'HS_OPEN_CURSORS' returned '50 '.

    HOSGIP to 'HS_FDS_FETCH_ROWS' returned '1 '.

    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536".

    HOSGIP to 'HS_NLS_NUMERIC_CHARACTER' returned '. "

    HOSGIP to 'HS_KEEP_REMOTE_COLUMN_SIZE' returned 'OFF '.

    HOSGIP for "HS_FDS_DELAYED_OPEN" returns 'TRUE '.

    HOSGIP to 'HS_FDS_WORKAROUNDS' returned '0 '.

    HOSGIP to 'HS_FDS_MBCS_TO_GRAPHIC' returned 'FALSE '.

    HOSGIP to 'HS_FDS_GRAPHIC_TO_MBCS' returned 'FALSE '.

    HOSGIP to 'HS_FDS_RECOVERY_ACCOUNT' returned 'RECOVER '.

    HOSGIP for "HS_FDS_TRANSACTION_LOG" returns "HS_TRANSACTION_LOG".

    HOSGIP to 'HS_FDS_TIMESTAMP_MAPPING' returned 'DATE '.

    HOSGIP to 'HS_FDS_DATE_MAPPING' returned 'DATE '.

    HOSGIP to 'HS_FDS_CHARACTER_SEMANTICS' returned 'FALSE '.

    HOSGIP for "HS_FDS_MAP_NCHAR" returns 'TRUE '.

    HOSGIP to 'HS_FDS_RESULTSET_SUPPORT' returned 'FALSE '.

    HOSGIP to 'HS_FDS_RSET_RETURN_ROWCOUNT' returned 'FALSE '.

    HOSGIP to 'HS_FDS_PROC_IS_FUNC' returned 'FALSE '.

    HOSGIP to 'HS_FDS_REPORT_REAL_AS_DOUBLE' returned 'FALSE '.

    using mpgw as the default value to "HS_FDS_DEFAULT_OWNER".

    HOSGIP to 'HS_SQL_HANDLE_STMT_REUSE' returned 'FALSE '.

    SQL text of hgopars, id = 1, len = 36...

    45 00: 53454 C 43542043 4F554E54 282 HAS 2920 [COUNT (*) SELECT]

    10: 46524F4D 20606D 61 696E5F70 61676573 [FROM ' main_pages]

    20: 60204131 [' A1]

    Delayed open until the first fetch.

    Deferred execution open.

    SQL text of hgopars, id = 1, len = 40...

    45 00: 53454 C 43542041 312E6073 75626 has 65 [SELECT A1.' subje(1)]

    10: 63746020 46524F4D 20606D 61 696E5F70 [ct' FROM ' main_p]

    20: 61676573 60204131 [ages A1]

    Delayed open until the first fetch.

    Deferred execution open.

    Please can someone help me.

    Thank you.

    Bianca

    Bianca,

    Everything I've read on this point to a need to install/reinstall the Microsoft Visual C++ Redistributable Package for windows OS 2008.

    You will need to download the appropriate version for your microsoft form system.  There is a lot of information on this topic.  Just

    search on the web, and it should help you in the right direction.

    Thank you!
    Matt

Maybe you are looking for

  • External memory slot

    All the information I read on the external memory slot refers to "microSD" type of memory. The slot is compatible with the type of memory more advanced 'microSDHC', please? naptonian

  • Hang module 8.0.6001.18702

    I was looking for the underlying problem in my computer information storage area and he says a 8.0.6001.18702 grip module is at the origin of the red flags in the region there. Because I have so much trouble with it does not no games on Facebook, and

  • MY c DRIVE is nearly full. Can I use my external hard drive because it has a lot of space

    My ' it shows only 123 MB available disc. I have a 500 GB external hard drive, but am not sure how to use it to free up space on my drive "C". Any help would be much appreciated. Roy Warner

  • SOLVED blackBerry Smartphones: BlackBerry Desktop Manager has stopped working

    Hello. Let me start by saying: I have a footstool to laptop Dell Vista 64-bit with 4 gig ram.  I have Desktop Manager v 4.7 installed and work much to sync my Outlook calendar and my Blackberry. From a week ago, the synchronization process gets all t

  • Which driver?

    I recently had 10 Windows installed on my studio 1558. I had a service IT this completely and had them test and solve a heating problem. But after getting my computer back, I notice that the DVD eject does not work by keyboard. I have to go on the dr