How to compare two TABLES and different lines of list?

I have two structural equal paintings aaa and bbb
that (could) have different lines.

How can I compare the tables and display different lines?

Peter

Something like this->

SELECT aaa.*,'bbb' "Not present in" FROM aaa
MINUS
SELECT bbb.*,'bbb' "Not present in" FROM bbb
UNION ALL
(
SELECT bbb.*,'aaa' "Not present in" FROM bbb
MINUS
SELECT aaa.*,'aaa' "Not present in" FROM aaa
)

Kind regards.

LOULOU.

Tags: Database

Similar Questions

  • How to compare two dates and find exactly

    How to compare two dates and find the exact age of the person, no one could be an age of child 2 days or a month, or other.

    I'd really appreciate if someone help o

    Concerning

    After spending 2 hours, I go out with a solution by myself, how ever the function can be customize to check if the user enters date right.

    function findAge(subjectName,fromdate, todate) {
        console.log("findAge(fromdate, todate) is called now "+subjectName+"-->"+fromdate+"-->"+todate);
        if(todate) todate= new Date(todate);
        else todate= new Date();
    
        var age= [], fromdate= new Date(fromdate),
        y= [todate.getFullYear(), fromdate.getFullYear()],
        ydiff= y[0]-y[1],
        m= [todate.getMonth(), fromdate.getMonth()],
        mdiff= m[0]-m[1],
        d= [todate.getDate(), fromdate.getDate()],
        ddiff= d[0]-d[1];
    
        if(mdiff < 0 || (mdiff=== 0 && ddiff<0))--ydiff;
        if(mdiff<0) mdiff+= 11;
        if(ddiff<0){
            fromdate.setMonth(m[1]+1, 0);
            ddiff= fromdate.getDate()-d[1]+d[0];
            --mdiff;
        }
        if(ydiff> 0) age.push(ydiff+ ' year'+(ydiff> 1? 's ':' '));
        if(mdiff> 0) age.push(mdiff+ ' month'+(mdiff> 1? 's':''));
        if(ddiff> 0) age.push(ddiff+ ' day'+(ddiff> 1? 's':''));
        if(age.length>1) age.splice(age.length-1,0,' and ');
        console.log("===============================");
        console.log("Subject age is = "+age.join(''));
        console.log(" age Day = "+ddiff);
        console.log(" age Month = "+mdiff);
        console.log(" age Year = "+ydiff);
        console.log("===============================");
        var subjectAGE =  age.join('');
    
    }
    

    peardox Thanks for the reply

  • I want to compare two tables and out a boolean

    This should be simple.  I want to compare two tables (5 items) and return a single Boolean value (T/F), not an array of Boolean.

    Thank you

    Kevin

    Right click on the comparison, the comparison mode, select compare the aggregates.

  • How to compare two dates and times in BPEL?

    Hi all
    I need to compare two dates and times in a switch activity, but could not find any function for her.

    My switch like this activity:

    case Date1 > date2:
    do something;
    otherwise:
    do something;

    He is not such a function in 'The functions of Date' and can not find this function to xpath.

    IBE, there is no function for a period of time to make (less one date of another?...) If this return to the data compare question).

    Thank you.

    Hello

    Logic function as more/less function can be used to compare two dates so that same comapring two numbers.

    Ex: If your variable reception contains two pieces of data such as date1 and date2, then you can use format in condition switch below.

    XpathXpression (date1) > XpathXpression (date2)

    hope this will help you.

  • compare two tables and update the differences

    Hi all
    Sorry for the newbie question, but I am a beginner in the present.

    I have two tables, both have same structure-

    CODE - code NUMBER (6,0) store is the primary key does not change and is unique
    ADDRESS1
    ADDRESS2
    ADDRESS3 - all VARCHAR2 (100)

    One of the tables is named MASTER, the other being updated. MASTER contains hundreds of lines, while the table of UPDATES may have anywhere from zero to 10 or more.
    I want to compare the table of UPDATES against the MASTER of the table and if there is a difference, ask the differences in the table in UPDATES to the MASTER of table - so if the address of an Exchange store, then the change is reflected in the MASTER table by crushing with the data contained in the UPDATES table.

    I thought that maybe using sliders and compare each field but there must be a more efficient way.

    I hope that I have explained quite clearly... any help would be greatly appreciated.

    Thank you
    Bill

    Education MERGE, assuming that your version supports supported the MERGER.

    SY.

  • How to join two tables of different schemas of Oracle by using a subquery

    I'm trying to join two different schemas of Oracle tables using a subquery. I can extract data from each of the tables without problem. However, when I combine select statements it by using a subquery I get Oracle error *'ORA-00936: lack of expression ' *. Given that each SELECT statement runs on its own without error I don't understand what's missing. I'm trying to get the result set is matching the LINE_ID of PDTABLE_12_1 in the schema with the table PDTABLE_201 MAT_DESCRIPTION DD_12809 in the RA_12809 schema.

    The query is as follows:

    SQL = "SELECT [DD_12809]. [PDTABLE_12_1]. LINE_ID OF [DD_12809]. [PDTABLE_12_1] JOIN "_".
    + "(SELECT [RA_12809]. [PDTABLE_201]. MAT_DESCRIPTION "_".
    "FROM [RA_12809]. [PDTABLE_201]) AS FAB "_".
    + 'ON [DD_12809]. [PDTABLE_12_1]. PIPING_MATER_CLASS = FAB. PIPING_MATER_CLASS ".

    The format of the request is copied from a manual of programming SQL.

    I also tried running the query uses a right JOIN on the two tables, but got the same results. Any ideas would be useful. Thank you!

    Published by: user11338343 on October 19, 2009 06:55

    The format for the join of two tables in Oracle feels like any other database:

    SELECT a.col1, a.col2, ..., b.col1, b.col2, ...
    FROM   schema1.table1 a,
           JOIN schema2.table2 b ON a.col = b.col and ...
    WHERE  a.other_col = 'FRED'
    AND    ....;
    

    Do not place bracketed identifiers in Oracle. The account that connects to the database must have select privileges on the two tables.

  • How to compare two .tdms signals different files?

    I develop a lie detection system in labview.so Inorder for that I need to compare the physiological threshold signals in the file .tdms with signals that I acquire the object for each question asked.i continuelsy use breathing and heart beat monitor as well as the sensorDAQ to acuire the physiological signals.so that are the function I should make use of? I have the following tools

    1 advanced signal processing toolkit

    2 adaptive filter toolkit

    3. digital filter design toolkit

    4 research biomedical toolkit

    Please give advise me on this.

    Thank you.

    Systems of lie detector (polygraph) generally work looking at physiological responses to the baseline subjects own and this in real time.  You can use a file that represents the stored "database" for the subject, but the overall environment, the circumstances, the general State of the subject, etc. is perhaps not sufficiently similar to easily see the subtle changes.

    From the stored file, you can determine a set of parameters or thresholds that indicate "normal, relaxed" for each signal.  You can play the file in your LabVIEW program, treat each channel and save these settings.  Then when you have the new data, you can read the new data file in and treat in a similar way and then determine if the settings are off limits you set for a 'lie '.

    You can get more answers to this question if posted in the Biomédical User Group

  • Oracle how to multiply two columns of different tables and results

    Oracle how to multiply two columns of different tables and get the result in the third column?

    I want to multiply all the lines of the quantinty column in the table of quantity with the relevant lines of the table of prices price column and get the result of multiplying in the third column. What should I use procedure trigerr? OR IS IT POSSIBLE HOW TO DO IT PLEASE HELP :D

    Edited by: 994229 2013-03-15 12:44
    /* Formatted on 3/15/2013 3:51:08 PM (QP5 v5.185.11230.41888) */
    CREATE TABLE mytable1
    AS
       (SELECT 1 id, 5 VALUE FROM DUAL
        UNION ALL
        SELECT 2, 7 FROM DUAL
        UNION ALL
        SELECT 3, 8 FROM DUAL);
    
    CREATE TABLE mytable2
    AS
       (SELECT 1 id, 4 VALUE FROM DUAL
        UNION ALL
        SELECT 2, 12 FROM DUAL
        UNION ALL
        SELECT 10, 12 FROM DUAL);
    
      SELECT id,
             mytable1.VALUE,
             mytable2.VALUE,
             mytable1.VALUE * mytable2.VALUE product
        FROM mytable1 FULL OUTER JOIN mytable2 USING (id)
    ORDER BY id;
    
    ID     VALUE     VALUE_1     PRODUCT
    1     5     4     20
    2     7     12     84
    3     8
    10          12     
    
  • How to compare two lines in PL/SQL?

    Hi all

    How to compare two lines in PL/SQL? Is there a method I can use to compare their column by column instead?

    Any comments would be much appreciated.

    PhoenixBai wrote:
    By lines I mean, two rows of the same table!

    Ah, finally, we get a bit more useful information

    and I need to compare the column by column to see if there is a difference between these two rows.

    Like this, you mean?

    SQL> ed
    Wrote file afiedt.buf
    
      1  with data as (select 1 as id, 'A' as dta, 'B' as dta2 from dual union all
      2                select 2, 'A', 'B' from dual union all
      3                select 3, 'B', 'C' from dual)
      4  --
      5      ,chk as (select &id1 as id1, &id2 as id2 from dual)
      6  --
      7  select case when (
      8    select count(*)
      9    from (
     10      select dta, dta2
     11      from data, chk
     12      where id = id1
     13      minus
     14      select dta, dta2
     15      from data, chk
     16      where id = id2
     17      )
     18    ) = 0 then 'No Difference'
     19          else 'Difference'
     20          end as check_result
     21* from dual
    SQL> /
    Enter value for id1: 1
    Enter value for id2: 2
    old   5:     ,chk as (select &id1 as id1, &id2 as id2 from dual)
    new   5:     ,chk as (select 1 as id1, 2 as id2 from dual)
    
    CHECK_RESULT
    -------------
    No Difference
    
    SQL> /
    Enter value for id1: 1
    Enter value for id2: 3
    old   5:     ,chk as (select &id1 as id1, &id2 as id2 from dual)
    new   5:     ,chk as (select 1 as id1, 3 as id2 from dual)
    
    CHECK_RESULT
    -------------
    Difference
    
    SQL>
    

    My only concern is the result of this sql. East - reliable? It can really be used to differentiate the two lines? I mean, the result would be the same, as I do with Java?

    Not sure what you mean by "reliable"? SQL is not some kind of generator of random result (by derogation from the use of the DBMS_RANDOM package). If you ask him if 1 + 1 = 2, then it will always give you the right answer.

  • How to compare two different backgrounds

    Can one tell me please how to compare two circles as DEVL test?

    I don't know how to compare a project (like DEVL test) but I want to see all the changes in all the objects between two different backgrounds.

    Please help me.
    Thank you.

    use AppDesigner, navigate to tools / compare and report / database

    The target DB access code,
    Press Options
    comparison of Goto tab options & select compare Type = database

  • BUG? Statement of BRIDGE to compare two tables

    Hello

    I tried to compare two tables different dbs and remembered a post on applications to Connectin Cross
    http://barrymcgillin.blogspot.com/2010/11/cross-connection-queries.html
    BRIDGE temparb AS "EB05 01"
    (SELECT * FROM arb)
    (SELECT * FROM temparb 
    MINUS 
    SELECT * FROM arb
    )
    UNION ALL
    (SELECT * FROM arb
    MINUS
    SELECT * FROM temparb 
    );
    I expect to get the differences between the ARB table in my current schema and the table alias temparb arb in the other db. Yet it seems that in this case only the table in my current schema is read.

    I materialize at the table BRIDGE with
    BRIDGE temparb AS "EB05 01"
    (SELECT * FROM arb)
    and select the value that I know to be only in the remote schema
    SELECT id FROM temparb WHERE id = 2562;
    SELECT id FROM arb WHERE id = 2562;
    Both times I get no results. I even tried to use aliases on the table, same result. Tested in EA3 3.0 and 3.1.

    Has anyone tried this before?

    Concerning
    Marcus

    Hi Marcus,

    Have you tried without the quotes around the name of connection?

    I have a named connection
    system_local
    which I run the following command

    drop table testbridge_remote;
    drop table testdbrige;
    create table testbridge (col1 int);
    insert into testbridge values (1);
    insert into testbridge values (2);
    insert into testbridge values (3);
    commit;

    I have a named connection
    Name of the connection with space
    I performed the following in the

    drop table testdbrige;
    create table testbridge (col1 int);
    insert into testbridge values (4);
    insert into testbridge values (5);
    insert into testbridge values (3);
    commit;

    Then I can execute the following statement in the connection of system_local/worksheet

    BRIDGE testbridge_remote as the name of connection with Space(select * from testbridge)
    + (SELECT * FROM testbridge_remote +)
    LESS
    SELECT * from testbridge
    +)+
    UNION ALL
    + (SELECT * FROM testbridge +)
    LESS
    SELECT * from testbridge_remote
    +);+

    It works well.
    Returns the rows in the remote table not in the local table and lines in the local table, not the remote table.

    Kind regards
    Dermot
    SQL development team.

  • How to compare two files to see the differences in the content?

    How to compare two files (one word and a single pdf) to see if the files are identical without having read all 7 pages?

    Thank you

    You cannot compare files of different nature. If you convert the Word file to PDF, you can then compare the two files in Acrobat.

  • Compare two tables, APEX

    Hello

    I am trying to compare two tables, but I want to display values that are the differnet from one to the other,
    both tables have the same columns and have the same PK.

    Thank you.

    Hello

    You probably need a report based on a query like this:

    SELECT
       d1.deptno,
       d1.dname,
       d2.dname,
       d1.loc,
       d2.loc
    FROM
       dept1 d1
       INNER JOIN dept2 d2
       ON d1.deptno = d2.deptno
       AND (      d1.dname <> d2.dname
                OR d1.loc <> d2.loc
              )
    

    You can also consider using FULL JOIN where you have different values of primary key in both tables and you want to include in the report.

  • How interrogate in two tables

    Hi all
    How to query in two different tables? Use the following text

    SET_BLOCK_PROPERTY ('ins1', ONETIME_WHERE, ' series = "' |: OVERALL.) CODE | ''''); This works but for a single table if I want two tables and and display the information to the main form, for example... tables are referenced by a primary key constraint and foreign key.


    Sarah

    Published by: SarahSarahSarah on September 1, 2009 04:59

    Please try to create a relationship of block in your form.
    in the browser open the node of data blocks, then then INS1 node and click relationships.
    Click the green + * button on the left vertical toolbar.

    Block detail:
    PLATE type

    Deletions from Master:
    -In cascade (deletion details when the master is removed)

    Coordination:
    -Prevent the operation without a master

    Join:
    type (Word): REF
    do not select REF Object (this has nothing to do with your REF column!)

    Click OK and that's all.
    May you do not change or delete the new created triggers and program units to the
    you know what you're doing.

  • Compare two Tables question

    Hello

    I need to compare two tables (T1, T2) and update existing records only in T2, but not in T1. So basically, the lines updated in T2:

    Select * from T2 where T2.id not in (select id from T1).

    What would be a good way to achieve this in ODI?

    I created an ODI interface with a join T2.id not in T1.ID, but it did not work "coz:" ORA-01427: einreihig subquery returns several lines "."

    Appreciate any input/access map.

    Thank you.

    Hi Michele...

    At first glance, there are at least 2 ways to do it:

    (1) put the steps in "(select id from T1)" (you can use an ODI API to get the schema dynamically) as an object filter to T2 (interface), use the incremental update IKM SQL and put "Insert" option on 'No'. " This will do a few updates.

    OR

    (2) in an interface set the T1 and T2 and left join (based on T2) load a temp table where all fields accept the value zero. Next to the columns to update (of course the T2), create an ID column (I named him as T1_Temp_ID) and map the Id of the T1 to it.
    Now just create new interface where the temperature is source and put a filter like "T1_Temp_ID is not null.

    The first option is less complex and can bring better performance.
    The second option gives a better follow-up of the use of the table and the columns, but can be less performatique.

    This help you?

Maybe you are looking for