How to get the row difference from two tables

I am not good at SQL. Here is a problem I am having
I have two tables say Employee_Master and Employee_Today. Employee_Today table is basically a subset of Empolyee_Master. At a given time, I want to query the database and and get all the employee names from Employee_Master table that are NOT in the Employees_Today table. How would I write that?
Select a.name from Employee_Master a, Employee_Today b where ..........?
Thanks for suggstions

if i understand your requirement correctly try this:
Select a.name from Employee_Master a
Where  Not Exists
      (Select 'x' From Employee_Today b
       Where  b.name = a.name) ;hope this helps

Similar Messages

  • How to find the structural difference between two tables

    Hi all,
    How to find the structural difference between two tables .
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    Thanks,
    P Prakash

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

  • How to get the row reference of inner table of an advance table

    Hi Gurus,
    Using R12.1.3, How to get the handle of inner table row reference of an advance table in controller.
    Regards,
    Zakir

    The javadoc for oracle.jbo.Key is really helpful.
    getAttributeNames()
    getAttributeValues()
    etc

  • How to get the insert scripts from a table data

    hi all,
    i want insert scripts for 100 records from a table.
    suppose i have a table xyz
    xyz:
    id name
    1 abc
    2 def
    i should get insert script for 100 rows like
    insert into xyz(id,name) values (1,'abc');
    insert into xyz(id,name) values (2,'def');
    i want 100 records data from all the tables from my database.
    thanks in advance to all.

    SQL> create table xyz (id number, name varchar2(10));
    Table created.
    SQL> insert into xyz values(1,'abc');
    1 row created.
    SQL> insert into xyz values(2,'def');
    1 row created.
    SQL> select 'insert into xyz values(id,name) values('||id||','''||name||''');' from xyz;
    'INSERTINTOXYZVALUES(ID,NAM
    insert into xyz values(id,name) values(1,'abc');
    insert into xyz values(id,name) values(2,'def');
    SQL>- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to get checked rows data from a table?

    Hai
    For displaying a check box in my table in jspx page,I created a transient Attribute , sel and select type as Boolean.Then When i drag and drop the viewObject in to my jspx page.The table cantain id,Name,Designation,Salary,sel
    Then i deleted the binding in the sel column,and drop a Select Boolean checkBox in to that column.Then in the property inspector i bind the value as #{row.sel} for checkbox..
    In my table suppose there are 5 rows..I checked only 3 of them.When i pressed a button,the corresponding id 's should be fetched from the checked rows in the table and i want to show some more details corresponding to that id 's in to another table in the jspx page.I am using jdev 11

    Hi,
    So if I get you correct this time, you do not want to select the rows by clicking on the table row but rather by selecting the checkbox you created. Correct? Sorry, the earlier confusion is due to me "thinking in Trinidad". Anyway, you can then set the table's rowSelection as None, since you won't be selecting the row that way. Try the code below.
    public String doSomething() {
        List<Row> rows = getAllRows(getTable1());
        for (Row row : rows) {
            if ((Boolean)row.getAttribute("sel")) {   // Check if it's true which (should) indicate the checkbox as being selected
                System.out.println(row.getAttribute("id"));   // Your selected id based on the checkbox you selected.
    public List<Row> getAllRows(RichTable table) {
        List<Row> rowList = new ArrayList<Row>();
        Row row = null;
        FacesCtrlHierNodeBinding rwData = null;
        int total = table.getRowCount();
        for (int i = 0; i < total; i++)  {
            rwData = (FacesCtrlHierNodeBinding)table.getRowData(i);
            if (rwData != null) {
                row = rwData.getRow();
                rowList.add(row);
        return rowList;
    }Some points to take note. The getAllRows method loops through the whole VO. So if you have 10,000 rows, it loops 10,000 times. If you are dealing with large records and/or want to optimize the code, you'll need to loop through the "displayed rows" only. For that, you'll need to tweak the code.
    Regards,
    Chan Kelwin

  • How to get the rows in a multiselect table automatically checked?

    Hi,
    I have retrieved all the rows whose job status is 'Manager'. Now i need these rows to be automatically checked when a button is clicked.
    how do i do this?
    Please reply as soon as possible.

    Hi,
    is this a new thread or is it a duplicate of http://forums.oracle.com/forums/thread.jspa?messageID=2339633
    Frank

  • How to get the row count of a Table DATA?

    Hi,
      In my Adobe form layout, I have a Table node which is bound to an internal table. Now at runtime, I want to determine the number of rows that the internal table has, i.e the row count of the DATA node of the Table. How will I be able to determine the no. of rows of the internal table at runtime using Javascript? I am not being able to find any suitable answer in this forum. Please suggest. Thanks in advance.

    Hi,
    If you bind the interactive form table to the internal table and specify some properties, the table will vary its row size according to the number of data available in the internal table.
    You have to wrap the table in a sub form,  check 'allow page break with contents' and property 'flowed'.
    the table will automatically increase its row size...
    Is this the reason for which you wanted for the row count..?
    If so, this will help you..
    Regards.
    Surya

  • Getting the row id from a table

    Hi
    I have a dynamic table that sets a uniquie id number to each.
    <TR id="1"> </TR>
    <TR id="2"> </TR>
    etc...
    I want to be able to click on a row and detect what this id is in JSP.
    Can this be done?? If so how?
    Thanks in advance

    I suppose the ID is dynamically create too.
    If you need the row's clicked ID in the same page you can do like follow.
    If you must send the selected ID to JSP, Servlet, EJB... you can create an hidden field and set its value with this ID... then post it to server..
    I would make in this way...
    <html>
    <head>
    <script language="Javascript">
    function showID(whatID){
    alert(whatID);
    //You can also set the value of an hidden field
    </script>
    </head>
    <body>
    <table>
    <tr id="1" onclick="javascript:showID('1')">...</tr>
    <tr id="2" onclick="javascript:showID('2')">...</tr>
    <tr id="n" onclick="javascript:showID('n')">...</tr>
    </table>
    </body>
    </html>
    I hope be useful.

  • How to get the Runtime ID from Audit tables?

    Hi,
    I have a process flow which contains two processes. Each process has 20 mappings. after the process executes correctly, I need to pick up OWB runtime ID and store it in my own audit table. How to implement this?
    Regards
    Kishan.

    Hello,
    this link is the solution to your problem: Capture RUN_ID when executing a mapping
    Export the sample mapping in this link and import it in your OWB.
    Regards
    Franz

  • How to calculate the phase difference between two square wave (acquired from two channel in one DAQ)

    Hello everyone ,
     I need a quickly help that as below :
    I am trying use PCI-6220 to acquired six signals from one rotation encoder (channel A, channel B,channel Z ,and their non-signals) .The encoder out signals will be square wave and 4000pulses per revolution. I set it rotation at 300rpm speed. I need show every square wave of six out channels in waveform and measure the A-B phase difference to check if the value is correct (designed value should be 90deg) .
    I have no idea how to measure or calculate the phase difference of two square wave base on synchronizate to acquire these two square wave from two channel on the PCI-6620....
    Anyone can give a idea how to calculate the phase difference with two square wave ?
    Thank a lot and Thanks again...
    Tim

    Tim,
    Here is a simple rising edge detector for one channel.
    Lynn
    Attachments:
    Rising edge.vi ‏15 KB

  • How to get the row Count of a ResultSet

    How to get the row Count of a ResultSet

    Hi
    I'v tried rennie1's way ,but I only get zero,my code is:
    rs.executeQuery("select count(*) from t_test");
    if (rs.next()) int rowCount=rs.getInt(1);
    I also tried barni's way ,but the method rs.last() and rs.beforeFirst() throw a same Exception
    I tried another way,the code is:
    while rs.next(){
    // Do nothing ,just move the cursour to the last row
    int rowCount=rs.getRow()
    However,the rowCount still equal zero
    Any help would be greatly apprecite!
    note:
    I get connection by DataSource's JNDI name from client, the Server is Weblogic Server 6, the DBMS is Oracle.

  • How to get the Database type from weblogic Db connection

    I want to use database version control in my application . that means different database type use different Sql Statement. Such as in weblogic7.0 if I create SqlServer JDBC pool then I will use some special Sqlserver sql Statement . such as some join statement. If I create Oralce JDBC pool then I have to use different Sql statement . because these two database support different Sql statement.
    What my question is how to get the database type from the connection.

    For a normal jdbc driver you can use
    Connection.getMetaData()
    To get the meta data, in particular the getDatabase...() methods.
    That might or might not work.
    However, at the very least in the server you have access to the weblogic properties so you can parse the pool property to figure it out.

  • How to calculate the hour difference between two dates?

    hi all,
    how to calculate the hour difference between two dates?
    eg i trying this...
    ((TO_DATE(TO_CHAR(GRNi.reference_date_4,'hh24:mi'),'hh24:mi') -
    TO_DATE(TO_CHAR(NVL(GRNi.reference_date_3,SYSDATE),'hh24:mi'),'hh24:mi'))*24)*60 Act_Hr
    Reg.
    AAK

    Hi
    To break the diff between 2 dates into days, hours, minutes, sec -- you can use the following:
    select to_char( created, 'dd-mon-yyyy hh24:mi:ss' ),
    trunc( sysdate-created ) "Dy",
    trunc( mod( (sysdate-created)*24, 24 ) ) "Hr",
    trunc( mod( (sysdate-created)*24*60, 60 ) ) "Mi",
    trunc( mod( (sysdate-created)*24*60*60, 60 ) ) "Sec",
    to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ),
    sysdate-created "Tdy",
    (sysdate-created)*24 "Thr",
    (sysdate-created)*24*60 "Tmi",
    (sysdate-created)*24*60*60 "Tsec"
    from all_users
    where rownum < 50
    HTH
    RangaReddy

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

Maybe you are looking for

  • How to configure sendmail to use multiple LDAP servers ?

    Hi everybody! I have a sendmail running on Solaris 10 and a LDAP server(192.168.1.9) also running Solaris 10 OS. I have configured the sendmail the following way: bash-3.00# ldapclient list NS_LDAP_FILE_VERSION= 2.0 NS_LDAP_BINDDN= cn=proxyagent,ou=p

  • Is it possible to change the status from Bid Rejected to Bid submitted?

    Hi there. We are working in SRM 4.0. One user rejected a bid, but it was a mistake. Is it possible to change the status from Bid Rejected to Bid submitted? We would like to modify the status from Bid Rejected to Bid submitted or Awaiting Approval to

  • Problems with snow leopard install- can not retrieve my user files

    would it make any sense to re-load my old operating disks (os x) to try and re-cover my old user. I have tried everything from disk repairs to disk warrior, nothing will allow me to copy the user so that i can back it up. Last resort is taking it in

  • Cannot open itunes after download

    I just bought my nano ipod. i downloaded everything as instructed;however, when i clicked on the itunes icon to open it--the agreement consent form pops up and disappears before i can click anything! also, the quicktime player pops up and then dissap

  • Switching b/w Word Processing & Page Layout

    Is there a way to transfer from a doc in WP-mode to Page Layout mode? Sorry for this very obvious question, but I can seem to find any info in the documentation or on the forum. Any help is, of course, massively appreciated. Cheers!