show duplicates

Hi all please help me understand this simple logic, why join did merge cartision?

I joined the table 1 and table 2, who did the same opl_seq for the leg_id. but the join is cartesion and display of the o/p
SELECT opl_seq
  FROM s_order_product_leg opl
 WHERE leg_id = 'F4287678';
O/P
126031589
123903654
SELECT opl_seq
  FROM s_opl_link_data_fe fe
 WHERE leg_id = 'F4287678';
O/P
126031589
123903654
SELECT opl.opl_seq
  FROM s_order_product_leg opl, s_opl_link_data_fe fe
 WHERE fe.leg_id = 'F4287678' AND fe.leg_id = opl.leg_id
o/p
126031589
123903654
126031589
123903654

Why not?
Databases are born to join, they love the joins!

However: you can use DISTINCT or GROUP BY.

select distinct opl.opl_seq
from   s_order_product_leg opl
,      s_opl_link_data_fe fe
where  fe.leg_id = 'F4287678'
and    fe.leg_id = opl.leg_id;
select opl.opl_seq
from   s_order_product_leg opl
,      s_opl_link_data_fe fe
where  fe.leg_id = 'F4287678'
and    fe.leg_id = opl.leg_id
group  by opl.opl_seq

Published by: hoek on November 25, 2009 18:05

Tags: Database

Similar Questions

  • Show duplicates no longer Option iTunes 12.4

    iTunes recently updated to 12.4.0.119 interface and now the "Show duplicates" option is no longer available.

    So far, if I've highlighted the DISPLAY bar I could scroll down to DISPLAY the DUPLICATES and doubled in my iTunes database files would be visible.
    I have a lot of files in my iTunes and tried to eliminate disk space on my computer. I have also a large number of duplicate files because after that I updated from a Windows based machine to the iMac, I imported all my old backups and of course it automatically filled all my music in iTunes. This is great, but now I have more than 30,000 music files in my iTunes. I'm sure I have only 15,000 or so unique song files and I want to eliminate the surplus.

    So my question now should be obvious: How can I view my files duplicates in iTunes 12.4?

    I'm operating an iMac running El Capitan 10.11.5.

    Sincerely,

    Music lover frustrated

    Have you think about 'My music' select file > library > show duplicate items

  • Anyone know where the option 'Show duplicates' disappeared? I can't find it in iTunes 12.4 :(

    Just like the topic...

    I have a large music library, but unfortunately contains many duplicates that I move slowly deleting. 12.4 installed and the option has disappeared from the view tab.

    No idea where it is, or has it been removed?

    It has been moved to the file > library menu.

    iTunes can create duplicates if the same content is added several times from outside the media folder when it is about to make copies of everything that is added to the library, or is added from an external drive that hosts the press kit that was disconnected during the launch of iTunes.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use display > show duplicate items (pre iTunes 12.4) or file > library > show duplicate items (post 12.4) then click on Same Album to display exact duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • Why doesn't my itunes file drop-down 'show duplicates '?

    Why doesn't my itunes file drop-down 'show duplicates '?

    Support for products Apple is located in the Apple Forums:
    https://discussions.Apple.com/index.jspa

  • Kindle showing duplicate books

    I'm sure I've seen a post related to this already but now can't find the thread so apologies if this has already been answered.

    I bought a book in Kindle that shows as a single purchase in the Kindle account easier.  However, it appears twice in the Kindle player "library" pane.  I can't find any way to move the duplicate. Any ideas?

    seanbrown wrote:

    I'm sure I've seen a post related to this already but now can't find the thread so apologies if this has already been answered.

    I bought a book in Kindle that shows as a single purchase in the Kindle account easier.  However, it appears twice in the Kindle player "library" pane.  I can't find any way to move the duplicate. Any ideas?

    Message relates to: HP TouchPad (WiFi)

  • How not to show duplicate lines, based on a field

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0

    Hello

    I have a query that looks like some scripts that did not stand on a given date compared to what ran the same day about a week ago. We want to include the start_datetime and the end_datetime but when I add it to the select statement, it evokes all instances of jobs that run several times during the day. Is it possible to exclude the extra lines based on the field of script_name?
    SELECT instances.script_name, 
                             instances.instance_name, 
                             REGEXP_REPLACE(master.description, 
                                            chr(49814),  -- em-dash
                                            '-') description
                                            --instances.start_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      MINUS
                      SELECT script_name, 
                             instance_name, 
                             NULL
                             --NULL
                      FROM   xxcar.xxcar_abat_instances 
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))

    LESS performs a set operation - remove lines from the first series that exactly match the second set.
    When you add columns to the first series, you want a smaller filter - try a NOT IN multi-column:
    To remove several courses, to regroup and get min/max

    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description,
                             min(instances.start_datetime) start_datetime,
                             min(instances.end_datetime) end_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      AND (script_name, instance_name) NOT IN
                    ( SELECT script_name,
                             instance_name
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))
                    )
    group by instances.script_name, instances.instance_name, master.description
    

    You do not give the definitions of table and query schemas in him, therefore I don't test it.

    Kind regards
    David

  • Serial numbers show duplicate in the condition of the equipment

    Hi all.

    I just came across something a little weird...

    I have two hosts (ESXi 4.1) and a vCenter 4.1 VM...

    When I add hosts everything is fine, but on the material status tab hosts I notice the same serial number (for each host)...  That's what I see.

    Model: IBM eServer BladeCenter HS21-[8853PAU]-, serial number:-[UUID:7B71D5C14EB311D89114A9859F2E8988]-,.

    Note that the serial number above is not the actual number of the series of hosts.  In fact this is not yet the UUID of the host machines...  The two host machine have a completely different UUID...  I decided to check the database and this aforementioned UUID does not exist...

    Everything works fine, with the exception of the foregoing...

    I'm curious to know what follows.

    1. whence this UUID generated...  Not the servers.

    2. is there a way to change this, I can't find it in the comic book...  (SQL2005 Express).

    Thank you all...

    There was a problem with blade IBM systems that has been fixed in update 1

    See http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_u1_rel_notes.html

    vCenter Server incorrectly reports the serial number of the blade chassis
    For blade servers running ESXi, vCenter Server incorrectly reports the serial number of the chassis blade instead of the blade. On a Dell or IBM blade which is managed by vCenter Server server, the service tag is listed in the system section of the vCenter vCenter Server Server > tab Configuration under processors. This problem occurs because of an incorrect value for the SerialNumber of the Fixed OMC_Chassis CIM instance property. The problem is fixed in this version.

    André

  • Show duplicates in the forum

    Hello

    This is regarding Expdp programmer mode of opening of the Redo logs objects I had a problem with export and DBMS_SCHEDULER. I was not sure whether if a DBA specializing in export will be able to resolve the issue or if a person specializing in the Planner will be able to solve the problem. Also I wanted to contribute to my colleagues from these two specialists on the issue above. Kindly permit an exception to the rule of dual display in this case.

    Sometimes I can't find the answers to my questions. For example a query about the SCHEDULER, RULESETS, RULES was published by me in forum Planner in August. I had to move to the PL/SQL forum as there was no answer to my query. In such scenarios, I can't drop the initial thread as it was mainly a SCHEDULER implementation using PL/SQL.

    Kindly tell me the rule regarding issues affecting many concepts. We may have questions about all the concepts involved in the issue.

    Hope it makes sense.

    Thank you very much

    I guess you're going to decrease the chances of getting your thread locked if you explain in your first sentence why is it that you post the same question in more than one forum.
    Several messages in the forum even usually lock themselves or at least some of the responses indicating that multi - display is not the appropriate label.
    But asking and explaining why you post the same question in several forum should consider at least to be authorized by a moderator, IMO.

  • Get-vmhost shows duplicates

    When I run this command, I get all the servers in the data center listed twice one we have ideas

    I had a small route autour in the database of the belly and I vpx.host table has all listed times

    Anyone have any ideas?

    You probably logged twice.

    Make sure that you have only a single connection.

    Arnim

  • Show duplicate lines times

    Dear members,

    Lets assume that we have data as below:
    Receipt number      txn date      Item Number            com batch        gain      locator
    ---------------------------------------------------------------------------------------------------------------
    134565                15/05/2011      710                   230             20        L123
    178907                20/05/2011      710                   230             20        L123
    253535                19/05/2011      710                   450             70        L456
    983636                05/05/2011      710                   345             60        L721
    I needed to write a query so that the result should be:
    Receipt number      txn date      Item Number             com batch        gain      locator
    ---------------------------------------------------------------------------------------------------------------
    134565                15/05/2011      710                   230             20        L123
    178907                20/05/2011      710        
    253535                19/05/2011      710                   450             70        L456
    983636                05/05/2011      710                   345             60        L721          
    Of the foregoing for 710 point, we have two numbers for which we same in the columns of data * 'batch com', gain, index *. So I need to write a query in such a way so that the data for the three columns if same should appear only once as stated above.


    I don't get clues on how to do it.

    Any ideas?

    Thank you
    Sandeep

    You can try like this,

    Not tested!

    SELECT reciept_number,
           txn_date,
           item_number,
           DECODE (rn, 1, com_batch) com_batch,
           DECODE (rn, 1, gain) gain,
           DECODE (rn, 1, LOCATOR) LOCATOR
      FROM (SELECT A.*, ROW_NUMBER () OVER (PARTITION BY item_number, com_batch, gain, LOCATOR ORDER BY txn_date) rn
              FROM table_name A)
    

    G.

  • House of duplicate video iPad

    Shared movies are reproduced on iPad to my daughter.  I don't know when this happens, or why, but it seems that the only solution is to disconnect home sharing iTunes account, restart his iPad and then reconnect to the share of the House.  It becomes so boring it was time, I asked for help.  Why this happens and what can we do to prevent it?

    Thank you

    I had this happen with music in iTunes because of sync purchased music from my computer rather than download to my devices in iTunes.

    Try this on the iPad showing duplicates

    1. go to settings

    2. scroll down and tap on videos

    3 disable "Show iTunes purchases.

    That should eliminate displaying purchased content on iTunes which is available for download.

  • the option remove duplicates has been removed!

    I have just been advised by apple to use this option to remove duplicate songs - the option has been removed. Why?

    Hello

    You can always find the duplicates. It was move to file > library > show duplicate items.

    Jim

  • Anyone know how to find duplicates in iTunes 12.4?

    The support page Apple, find and remove duplicates in your iTunes - Apple support, is now obsolete in terms of iTunes 12.4.

    Does anyone know of another way to identify duplicates? Duplicates added, to add insult to injury by Apple and Apple game music "inspired".

    File menu > library > show duplicate items.

  • I updated itunes to 12.4.0.119 and now find under the column of the view may not display the duplicate songs

    I have updated itunes to 12.4.0.119 and now impossible to find in the duplicate songs of column - the view

    I had the same problem, but a solution was found in another forum:

    Once more, Apple settled things. It is now at...

    file/library/show-duplicate-items

    These guys are worse with each update iTunes

  • No longer find 12.4 duplicates?

    I had the intention to do this so long and keep the power off. Now, it seems that it is impossible?

    File > library > show duplicates

Maybe you are looking for