Outer join on the Filter Condition

Hello

I would like to show all rows in a query for two conditions to filter on the 'status '. I used an outer join on the outer query to return the values inside the inline query, but it returns not to return all rows.

create table (test)
ID number,
start_date date,
status varchar2 (1).
number of amount,
number of cust_type
);


Insert test values (001, June 1, 2014 ", am ', 189, 78");
Insert test values (001, March 26, 2014 ", 'R', 175, 4");
Insert test values (001, December 1, 2014 ", 'R', 89, 91");
Insert test values ("001, 13 August 2014 ', 'J', 19, 2);
Insert test values (001, 12 August 2014 ', 'E', 19, 2);

Insert test values (002, January 1, 2014 ', 'R', 17, 4);
Insert test values (002, 26 June 2014 ", 'R', 175, 4");
Insert test values (' 002, February 1, 2014 ', 'J', 9, 8);
Insert test values (002, 13 October 2014 ', ', 190, 2);

Insert test values (' 003, June 1, 2014 ', 'J', 189, 78);
Insert test values (003, March 26, 2014 ", 'R', 175, 4");
Insert test values (003, December 1, 2014 ", 'R', 89, 91");
Insert test values (' 003, 13 August 2014 ', 'J', 19, 2);
Insert test values (' 003, 12 August 2014 ', 'J', 19, 2);

commit;

Select i.ids, i.start_date, i.cust_type, i.amount as gross_amount, i.amount + ii.amount as net_amount
test I have,
(select id, amount)
of the test
where (status = status or 'R' = 'J')) ii
where i.cust_type in (4, 78, 91, 2, 4, 8)
and i.ids (+) = ii.ids
and i.status (+) to (', 'E')
"and i.start_date between 1 January 14 ' and 31-dec-2014."

The query above exclude ID 003 because there is that no status (M / E) butI want always display all codes, even if the condition is not consistent

Hello

Want results from an inner join to match identifiers, but the results of an outer join for identifiers that are not?  In other words, you want to include the rows of the table I only when one of the following is true:

The line of table I have ticked all the boxes, or

No line in not table i with the same ID meets all conditions

?

If so, here's a way to do it:

WITH got_rnk AS

(

Select i.ids, i.start_date, i.cust_type

, nvl2 (ii.ids, i.amount, 0) as gross_amount

, i.amount + nvl (ii.amount, 0) as net_amount

dense_rank () over (partition of i.ids

order of nvl2 (ii.ids, 'A', 'B')

) as rnk

I have test

(in left outer join

SELECT ID, amount

of the test

where status ('R', 'J')

) ii on i.ids = ii.ids

and i.cust_type in (4, 78, 91, 2, 4, 8)

and i.start_date between to_date (January 1, 2014 ", 'dd-mon-yyyy')

and to_date (31-dec-2014', 'dd-mon-yyyy')

and i.status in (', 'E')

)

SELECT ID, start_date, cust_type

gross_amount, net_amount

of got_rnk

where rnk = 1

;

Results of your sample data:

ID START_DATE GROSS_AMOUNT NET_AMOUNT CUST_TYPE

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

1 1 June 2014 78 189 364

1 1 June 2014 78 189 278

1 1 June 2014 78 189 208

1 12 August 2014 2 19 38

1 12 August 2014 2 19 108

1 12 August 2014 2 19 194

2 13 October 2014 2 190 207

2 13 October 2014 2 190 365

2 13 October 2014 2 190 199

3 March 26, 2014 4 0 175

3 1 June 2014 78 0 189

3 12 August 2014 2 0 19

3 August 13, 2014 2 0 19

3 1 December 2014 91 0 89

Tags: Database

Similar Questions

  • SSRS for lack of outer join with the Oracle data source

    It seems to be a problem with the Oracle driver used in the Reporting SERVICES query designer.

    When you use an Oracle data source, if I create an outer join in the graphic designer, it automatically inserts '{OJ' before the join and '} ' after her.  This is an incorrect syntax for Oracle and refuses to start.  The curly braces and the JO editable in designer text, but if I go back to the graphic designer and immediately to reintegrate them.

    Only, this has started to happen a year or two ago - before that it worked, but with the old (+) syntax.

    Can it not be healed?  It makes things very difficult.

    -Geoff

    Hi Geoff,

    Thanks for posting in the Microsoft Community.

    However, the question you posted would be better suited in the Forums of the Oracle Support; We recommend that you post your query in Oracle Support Forums to get help:

    https://forums.Oracle.com/forums/main.jspa;JSESSIONID=8d92100c30d8fb401bcbd10b46c38c9ddf1a3242549a.e34SbxmSbNyKai0Lc3mPbhmSc3aNe0? CategoryID = 84

    If you have any other questions or you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • using outer joins if the two column is null? Use only (+)

    Hi all

    create the table xxc_tr_num (tl_number number, tr_no number tl_no_id);

    insert into xxc_tr_num values (123,100,222);

    insert into xxc_tr_num values (124,100,333);

    create the table xxc_od_tab (tl_number number, tl_id number);

    insert into xxc_od_tab values (123,001);

    insert into xxc_od_tab values (null, null);

    create table xxc_oth_tab (name varchar2 (10), number of tl_id);

    insert into xxc_oth_tab values('abc',,001);

    insert into xxc_oth_tab values (null, null);

    Wait it out put

    tr_no tl_no_id name

    100 222 abc

    100 333

    using outer joins if the two column is null? use only please of outer joins

    And I tried to use outer joins on both tl_id column but not get values and I use have County (tr_no ) > 1

    Rajesh123 wrote:

    Thank you Kiss it is not possible to use having clause?

    You need to understand the functioning of the group. If you will not be asked this question.

    Check this box

    SQL> select tr_no,
      2         tl_no_id,
      3         count(*)
      4    from xxc_tr_num a,
      5         xxc_od_tab b,
      6         xxc_oth_tab c
      7   where a.tl_number = b.tl_number(+)
      8     and b.tl_id = c.tl_id(+)
      9   group
     10      by tr_no
     11       , tl_no_id;
    
         TR_NO   TL_NO_ID   COUNT(*)
    ---------- ---------- ----------
           100        333          1
           100        222          1
    

    See what returns the count? You have grouped according to TR_NO and TL_NO_ID. You must take into consideration the TL_NO_ID just put COUNT (TR_NO) does not increase the NUMBER of the whole group. To get the NUMBER on the whole group, I used the analytical function and did. Like this, see the number of the analytical function here

    SQL> select tr_no,
      2         tl_no_id,
      3         count(*),
      4         count(*) over(partition by tr_no)
      5    from xxc_tr_num a,
      6         xxc_od_tab b,
      7         xxc_oth_tab c
      8   where a.tl_number = b.tl_number(+)
      9     and b.tl_id = c.tl_id(+)
     10   group
     11      by tr_no
     12       , tl_no_id;
    
         TR_NO   TL_NO_ID   COUNT(*) COUNT(*)OVER(PARTITIONBYTR_NO)
    ---------- ---------- ---------- ------------------------------
           100        222          1                              2
           100        333          1                              2
    

    So to answer your question, yes you can't do in the HAVING clause...

  • outer join in the view criteria

    Hello world

    I use jdeveloper 11.1.1.6.0

    I want to create outer join in the view criteria, so I had to substitute getCriteriaItemClause ViewObjImpl.java method

    my query is like this:

    SELECT t1. row_no, t2.type FROM table_1 t1, t2 from table_2

    WHERE t1. row_no (+) = t2. row_no

    and t1.user_Id (+) =: bindVar

    table_1 (row_no, user_Id)

    table_2 (row_no, type)

    the part " t1.user_Id (+) =: bindVar " should be put in the display criteria

    the method:

    @Override

    public String getCriteriaItemClause (ViewCriteriaItem viewCriteriaItem) {}

    String newQeury = this.getEntityDef (0) .getAliasName () + "." + viewCriteriaItem.getColumnName () + "(+) =:bindVar .

    Return newQeury;

    }

    but when I run the criteria see exception below raises:

    oracle.jbo.expr.JISyntaxError: Houston-36000: an unexpected token expression is found.

    When I remove the sign "(+)" of newQeury

    String newQeury = this.getEntityDef (0) .getAliasName () + "." + viewCriteriaItem.getColumnName () + "=:bindVar .  remove the sign "(+)" before =:bindVar

    raises the exception below

    Houston-29000: Unexpected exception caught: oracle.jbo.expr.JIEvalException, msg = Houston-25077: t1 name not found in the given object: ViewRow [[5-1-5] oracle.jbo.Key].

    Habib

    This is a duplicate of https://forums.oracle.com/thread/2577092

    Please do not post your questions several times.

    A possible solution posted to the original thread.

    Timo

  • How to use OMB to change the filter conditions in OWB maps

    Hello
    I want to know how we can use the OMB to change the filter conditions in an OWB map.

    In my scenario, I have a filter FLTR_1 operator in my cards and I need to change the filter condition of


    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1. VALUE > CONST_0_MAX_VAL

    TO

    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1. VALUE > CONST_6_MAX_VAL


    Just for more information for everyone we are migrating from OWB 9.2 10.2 OWB and we called constant procedures and used their values in filter conditions. 10.2 OWB generates the values for the constants in a way different than OWB 9.2 which is why this change is necessary. I want to automate the Act of changing the names of constants so that we can save time to change maps.

    THX

    Hello

    change in the framework of your database module, then try

    OMBALTER MAPPING 'MY_MAP' MODIFY OPEARTOR 'FLTR_1' SET PROPERTIES (FILTER_CONDITION) VALUES ('INOUTGRP1.ID IN (1,2) AND INOUTGRP1.VALUE > CONST_6_MAX_VAL ')
    

    Kind regards
    Carsten.

  • Outer joins to the left... Please help!

    Hmm. Ive had trouble with this one for a while and have read and re-read docs etc.

    IM under 11.2 XE and its Apex 4.2 application...

    Its a simple query with outer joins... but I can't simply to do it right after several hours of trying! ID be very grateful if anyone can lend a hand...

    For the query below. I am looking for the following:

    Complete list of entities, a sum of the values if they exist (and obviously empty if they don't), filtered by a table of SUM choice only the records that match a value in the lookup table.

    Select

    e.ENTITY as ENTITY,

    Sum (p.amount) as Forecast_Income,

    Sum (BR.bri_credit) as Actual_Income,

    Sum (BR.bri_debit) as Actual_Expenses

    Of

    e entities

    LEFT OUTER JOIN payments p

    WE (e.entity_id = p.entity_id)

    LEFT OUTER JOIN pmt_stat_lookup ps

    WE (p.status_id = ps.status_id

    and ps.forecast = 'Y')

    LEFT OUTER JOIN bri_recon br

    WE (e.entity_id = br.entity_id)

    E.entity group

    My problem with the join where I join p.status_id for ps.status_id and ps.forecast = 'Y '...   If I run the above statement, it seems does not account for this filter criteria and summarizes all records of PAYMENTS, regardless of...  If I move outside the outer join clause, it only brings back the records of PAYMENTS where there is a join. Ive tried to join in a different order etc... but in vain...

    If someone could help, Id be very grateful.

    Kind regards

    Richard

    Hello Richard

    Try this query:

    SELECT e.entity as ENTITY

    sum (PO.amount) as Forecast_Income

    sum (br.bri_credit) as Actual_Income

    sum (br.bri_debit) as Actual_Expenses

    Of

    E ENTITIES

    LEFT OUTER

    JOIN (SELECT P.entity_id )

    P.amount

    PAYMENTS P

    JOIN PMT_STAT_LOOKUP PS

    ON p.status_id = ps.status_id

    AND ps.forecast = 'Y '.

    ) IN.

    WE e.entity_id = in. entity_id

    LEFT OUTER

    JOIN BR BRI_RECON

    ON e.entity_id = br.entity_id

    E.entity GROUP

    ;

    I hope it helps.

    Best regards, David

    Post edited by: David Berger

  • outer join on the aggregate query

    This is probably a relatively simple matter, as long as I explain it well enough:

    I have two tables:

    categorycodes and properties

    categorycodes is a lookup table.

    both tables have a catcode field which is a char (1) that contains matching data (only the numbers 1 to 6)

    CREATE

    TABLE CATEGORYCODES

    (

    CATCODE CHAR (1 BYTE) NOT NULL,

    DESCRIPTION VARCHAR2 (25 BYTE) NOT NULL,

    CONSTRAINT CATEGORYCODES_PK PRIMARY KEY (CATCODE) ALLOW

    )

    catCode

    1

    2

    3

    4

    5

    6

    The properties table has approximately 600 000 records. The properties table also has a field named parcelno which is a tank (9).  It contains a string of figures and numbers only.

    What I would like is:

    catCode, count (*)

    1 580

    2 300

    3 3000

    4 235

    5 0

    6 80

    I limited the results of the query to make sure it was a game that would not all catcodes in it.  I have trouble to get the one with zero to display.  I know that this has to do with how I do the join, but I don't know what.

    It is a sample of what I've tried:

    Select i.

    Of

    (select catcode, count (*)

    property p

    where substr (parcelno, 1, 3) = ' 871 "

    Catcode group) i

    outer join right categorycodes cc

    We i.catcode = cc.catcode;

    I'm not worried about the situations where catcode is null in the properties.  Parcelno cannot be null.

    Hello

    Looks like your query should work; except that you won't COUNT (*); That would make each issue at least 1.  COUNT (*) means that count the total number of lines, no matter what is on them, so he'll see the line with just the catcode of the lookup table that matches nothing and which count as 1.  You want to count the number of rows in the table of properties, so expect a column of the properties that cannot be NULL.

    Here is a slightly different way

    SELECT c.catcode

    EARL of (p.catcode) AS cnt

    OF categorycodes c

    P ON p.catcode = c.catcode LEFT OUTER JOIN properties

    AND SUBSTR (p.parcelno

    1

    3

    ) = ' 871 "

    ;

    If the condition about 871' ' part of the join condition, then you don't need a subquery.

    .

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Point where the above statement is erroneous results, and explain, using specific examples, how you get the right result of data provided in these places.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Help needed to apply the filter condition

    I need to apply a filter condition based on the database environment:
    1. only if the database name is UAT tb1. > 23 - OCT-2012 CREATED_DT.
    2. only if the database name is OATS then tb1.application_no in ('1 ', ' 2')
    3 If the database is a different database then these conditions do not apply.

    Try this

    Select  tb1.*,tb2.* from tb1
    join tb2
    on (tb1.col1=tb2.col1)
    join (select  case when global_name='UATDB' then 'UAT'
                             when global_name='QATDB' then 'QAT'
                             else 'OTHERDB' end DB_NAME  from global_name) DB
    on 1=1
    where (DB.DB_NAME='UATDB' and tb1.CREATED_DT > 23-OCT-2012)
    or (DB.DB_NAME='QATDB' and tb1.application_no in ('1' ,'2'))
    or (DB.DB_NAME='OTHERDB');
     
    

    Note: not tested code

  • outer join with the additional constraint

    Hello

    With the help of Oracle 11 g R2.

    I would of outer join tables 2 together and put down restrictions on the types of records that are returned in the query result. Here's a mock-up of the tables and data.

    create table aaa (col1 number not null, col2 number not null)

    create table bbb (col1 number not null, col2 number not null)

    insert into values of aaa (1: 80)

    insert into values aaa (2, 90)

    insert into values aaa (3, 80)

    insert into values aaa (4, 90)

    insert into values aaa (5, 80)


    insert into bbb values (3, 600)

    insert into values of bbb (4, 700)

    This is the query

    
    select a.col1, a.col2, b.col1, b.col2
    from aaa a, bbb b
    where a.col1 = b.col1 (+)
    and   (a.col2, b.col2) <> ((90, 700))
    

    The result of the query is as follows.

    col1 col1 col2 col2

    1 80

    3 80 3 600

    5 80

    Where col1 = 4 has been deleted, which is an expected result. However, where col1 = 2 has also been removed, which is not a desired outcome. Your response is appreciated.

    Hello

    Here is a way that works for the given sample data:

    SELECT *.

    AAA a

    LEFT OUTER JOIN bbb b ON a.col1 = b.col1

    WHERE the NVL (a.col2, 0) <> 90

    OR NVL (b.col2, 0) <> 700

    ;

    I don't know if that will satisfy your requirements with other data, since you didn't say what your needs are.

    Whenever you have a WHERE clause is applied after the outer join, all columns of the table in option (table bbb in this example) must be used in an NVL, NVL2 or something like a CASE expression that takes into account null values; otherwise, the effect will be the same as an inner join.

  • outer join on the left, needs improvement

    Two table t1 and t2 where t1.col1 = t2.col2
    create table t1 ( col1 varchar2(20));
    insert into t1 values('aa');
    insert into t1 values('bb');
    insert into t1 values('cc');
    insert into t1 values('dd');
    insert into t1 values('ee');
    
    
    create table t2 ( col2 varchar2(20) , col3 varchar2(20));
    insert into t2 values('aa','q_aa');
    insert into t2 values('bb',' ');
    insert into t2 values('cc','q_cc');
    insert into t2 values('dd',' ');
    
    
    here is my join query:-
    select t1.col1,t2.col2,t2.col3,
    case when t2.col3 is not null then t2.col3
         when t2.col3 is null then t1.col1 end as name1                                   
    from t1 left outer join t2
    on t1.col1 =t2.col2
    real to come result
    COL1 ^ ^ COL2 ^ ^ COL3 ^ ^ NAME1
    AA ^ ^ ^ aa ^ ^ ^ q_aa ^ ^ ^ q_aa
    BB ^ ^ ^ bb
    CC ^ ^ ^ cc ^ ^ ^ q_cc ^ ^ ^ q_cc
    JJ ^ ^ ^ JJ
    ee^^^^^^^^^^^^^^^^ee

    requirement of result
    COL1 ^ ^ COL2 ^ ^ COL3 ^ ^ ^ NAME1
    AA ^ ^ ^ aa ^ ^ ^ q_aa ^ ^ ^ q_aa
    BB ^ ^ ^ bb ^ ^ ^ bb
    CC ^ ^ ^ cc ^ ^ ^ q_cc ^ ^ ^ q_cc
    JJ ^ ^ ^ DD ^ ^ ^ JJ
    ee^^^^^^^^^^^^^^^^^ ee


    and how can copy paste the result of sql * more... box when I copy paste here it automatically omit the space, as above

    The problem is values col3 to the 'bb' and 'dd' lines are not null, because they have a space in them. You can either remove the space and use:

    nvl(t2.col3,t1.col1) as name1
    

    or tim space out:

    nvl(trim(t2.col3),t1.col1) as name1
    
  • left outer join and the where clause for the table to the right

    I want to join two tables a and b, where a is a must and b is a result set in option. When I use a left outer join to a to b, I want to achieve:

    1. Select a single column, two columns of b (not the join columns)
    2 - even if theres no friendly on the join column does not return data from one.
    3. If there is a match applies when the criteria on column b (table in option)

    so, how can I avoid no_data_found in this case? When I apply where criteria for b, so it does not return the data from one, which is a must.

    Sounds like a regular outer join to me...

    select a.col1, b.col2, b.col2
    from   tableA a
           left outer join tableB b
           on (a.id = b.id and b.colX = 'X')
    
  • How to specify an outer join in the query designer

    I quickly built a large query with the query designer, and it works very well, but does not produce 9 disks on 2200 - so I need to change to an outer join.

    My problem is that I can't find a way to specify an outer join. I tried to change the query, query builder formed, but it won't let me.

    I know that I can capture the query, edit and run it in sql developer and that works fine, but I want to use the Query Builder as it is the fastest way I know to quickly add and remove items - my users don't know exactly what that it to include.

    I know it's kind of a trivial question, but I searched the forum, manual, the web and no luck

    Thanks for any help you can give

    Glenn

    Hi Glenn,.

    When you use the query designer to create the sql statement, you must click on the empty box to the right of the fields in each table to create the join. When you are finished, you should see a line drawn between the two tables. Click on this line, and a small window appears allowing you to select inner outer or right outer joins, left.

    When the report was created, however, you must change the statement. For example, if you use the query designer to join DEPT at EMP based on the DEPTNO field on the two tables, you get:

    select      "DEPT"."DEPTNO" as "DEPTNO",
          "DEPT"."DNAME" as "DNAME",
          "DEPT"."LOC" as "LOC",
          "EMP"."EMPNO" as "EMPNO",
          "EMP"."ENAME" as "ENAME",
          "EMP"."JOB" as "JOB",
          "EMP"."MGR" as "MGR",
          "EMP"."HIREDATE" as "HIREDATE"
     from      "EMP" "EMP",
          "DEPT" "DEPT"
     where   "DEPT"."DEPTNO"="EMP"."DEPTNO"
    

    This is to change:

    select      "DEPT"."DEPTNO" as "DEPTNO",
          "DEPT"."DNAME" as "DNAME",
          "DEPT"."LOC" as "LOC",
          "EMP"."EMPNO" as "EMPNO",
          "EMP"."ENAME" as "ENAME",
          "EMP"."JOB" as "JOB",
          "EMP"."MGR" as "MGR",
          "EMP"."HIREDATE" as "HIREDATE"
     from      "EMP" "EMP"
          LEFT OUTER JOIN "DEPT" "DEPT" ON "DEPT"."DEPTNO"="EMP"."DEPTNO"
    

    Andy

  • How the snippet to the filter condition?

    Hello world
    I have a doubt. I searched a lot for the explanation, but could not find.

    I have a table TAB1 with columns A(primary key), B, C source
    There's an excerpt on TAB1, ext1, which has a filter clause "* filter (@compute (c) = 1) *"
    When I do an update on TAB1 with the following query
    setting a day TAB1 value B = 100 where A = 200; *
    the redo log will not have the value of C stored for this transaction (it will have the values between A and B only according to my knowledge)
    but the snippet should check if the operation meets the filter clause 'c = 1' which cannot be controlled of redo logs
    How to check?

    I did the update, has confirmed that the update is reflected also in the target table, then checked v$ sql area for any selection made by goldengate on source table query to check the value of C for the operation but I have not found such a request

    Published by: 958073 on February 13, 2013 12:41

    Published by: 958073 on February 13, 2013 12:42

    There are two ways to do:

    (1) to activate the extra record for column C, so each time a record is updated in the table, column C is recorded in the journals of recovery. This can be done in

    GGSCI > TRANDATA ADD . TAB1 COLLARS (C)

    (2) FETCHCOLS use in the TABLE of your snippet file param clause to allow for the recovery of column c of the source database when the value is not in the record of the transaction. This can be done by adding the following

    TABLE TAB1, FETCHCOLS (C),
    FETCHBEFOREFILTER,
    FILTER (@COMPUTE = 1 (c));

  • How to call SQL in the filter condition

    Hello

    Booking dashboard report, I need filter order_date between this quarter beginning date and this date of end of quarter.
    I customized data are available from quarter to quarter end date.
    How do I use the filter.

    Thank you

    Looks like you need filter the date of the order between the start of quarter and the ending quarter by ensuring that order dates is always present between the quarter start date and the date of end of quarter

    Create a report of sub with a column of order date and order date is invited.

    So now, in the report main use filter option advanced and

    Take the quarter start date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter start date is greater than the date of the selected order (order reporting date column)

    and

    Take the quarter end date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter end date is less than the date of the selected order (order reporting date column)

    In this way, you can force the order date always between the date of beginning of quarter and quarter end date columns

    It may be useful
    Thank you
    Prash

  • Deletion of rows in a table while the filter condition is in another table

    Hi all

    I am facing a problem of deletion of a row in a table where the condition is in the other table. To ealaborate the scenario further Let's say I have two tables T1 (the transactions table) and T2 (Master Table). I want to delete a record in the table T1 by checking conditions lies in table T2.
    I tried with the query below, but this request deletion of records in the table two.

    DELETE FROM (SELECT * high INNER JOIN T2 on T1 page TP)
    THE top. TID = TP. TID
    WHERE at the top. DEAL_SITE_ID = inputparameter1
    AND (TP. SEGMENT <>inputparameter2 OR tp.segment is not null));

    Here the record is deleted in the two tables, but I don't want to delete the data in my table master i.e table T2.

    Any help would be much appreciated. Thanks in advance.

    Kind regards
    Delphine
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    
    SQL>  delete from
      2  (
      3  select *
      4  from the_table  t1 inner join the_table_2 t2
      5  on  t1.x = t2.x
      6  and t1.y = t2.y);
    
    3 rows deleted.
    
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    

Maybe you are looking for

  • Import emails and contacts from the backed up .pst files

    I am setting up a new computer with thunderbird. I have a outlook on my old machine. I saved emails and contacts from outlook to a USB stick to transfer. I'm not finding where I can import .pst files into thunderbird. He is not one of the options ava

  • If I leave tabs open when I close Firefox then shut down PC, are the tabs available to hackers?

    I did not have this problem but someone at work warned me not to leave the tabs open when I stopped because the tabs open when the browser opens again... which is what I want, but she explained that open the tabs without having to re-enter passwords,

  • Equium M50-164: not blocking down

    I have an M50-164 and after I am on the web for a few hours I try to shut down the laptop (for example START > TURN OFF COMPUTER > SHUT DOWN) It won't work, that after that I tried 3 times using the same process as above then it will work, or sometim

  • Vista

    While playing a game yesterday, I hit the windows key on my keyboard to minimize the game, and now I can't the game to return to full screne. When I click on the check box expand, nothing happens. DOE anyone have suggestions

  • WMP not working or loading and install file says could not be installed because the latest version installed

    WMP has stopped working a few downloaded days ago new installer. When I try to use it, the message error "there is a more recent version pf WMP (11.0.6002.18311)... Not possible to use an older package (11.0.5721.5146) on the current drive. Could not