Request for the old data that does not correspond to new data within a given period

Hi all

The reports that I need to create one for all employees who were going from one Department to another within a given period. The way I ran this report in Reportsmith (taken from our old system) was to compare the dept field from the start date to the dept in the end date field and it gives me these associate who had moved. I had to do it this way b/c dept changes can occur using several different types of actions (change to Surv, promotion, etc.), none of them exclusive to only change dept. We now use Oracle HRMS and I need to create this report even with this system using SQL.

Does anyone know how to compare the data between two different dates and shoot those who do not match? Your help will be GREATLY appreciated!

Best regards,

Yasmin E. Alberto
HRIS analyst
[email protected]

Hello

Here is an example of an INSERT statement that may be relevant to this issue:

INSERT INTO emp_action (empno,   action_date,                           deptno)
                VALUES     (7902,    TO_DATE ('2009-06-18, 'YYYY-MM-DD'),   10);

If someone wants to help you, in doing anything more than guess, then that person probably will need create tables that are similar to yours (but much smaller).
To do this, they can issue instructions CREATE TABLE to the tables, the INSERT commands to fill (put data in) the tables.
The tables invloved in this problem are probably simple, so if I can see some INSERT statements, I can probably write instructions CREATE TABLE myself and save you the trouble.

For more info on INSERT, see the [Manual of the SQL language | http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_9014.htm#sthref8944]

If you compare the deptno to a row of a table to the previous line, you can use the analytic LAG, something like this:

WITH     got_prev_deptno  AS
(
     SELECT     empno
     ,     action_date
     ,     deptno
     ,     LAG (deptno) OVER ( PARTITION BY  empno
                                 ORDER BY         action_date
                      )   AS prev_deptno
     FROM     action_table
)
SELECT     *
FROM     got_prev_deptno
WHERE   deptno         != prev_deptno
AND     action_date >= TO_DATE ('2009-01-0'1, 'YYYY-MM-DD')
AND     action_date <  TO_DATE ('2009-03-01', 'YYYY-MM-DD')
;

Like all functions, the OFFSET is described in the [Manual of the SQL language | http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/index.htm#I].

Published by: Frank Kulash, June 18, 2009 11:53
Originally missed a few quotes.

Tags: Database

Similar Questions

  • We need a replacement for Windows Home Server that does not cost $700

    We need a replacement for windows home server that does not cost as much as a PC. 2011 is not really available and 2008 has compatibility problems, because it is based on XP and Server 2003. None of the motherboard manufactures will support XP (thanks to MS) and more recent SATA drives do not work in my motherboard more old.

    Perry

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • calendar for the week of jQuery does not work in the new version of firefox v42.0

    Hello
    Thanks for your reply.
    IAM develop on the issue that iam facing knowledge, events on the calendar for the week of jquery does not work in firefox version iam 42.0 faced to the problem that iam unable to change back or delete nominations that are displayed.
    For example if try clicking on one of the appointment generally a popup comes to change or to restore or remove the appointment but iam not getting that. But this feature does not work in lower versions of firefox (version 32.0 for example). Please check the jquery week calendar demo following URL looks like this:
    http://robmonie.github.IO/jQuery-week-calendar/full_demo/weekcalendar_full_demo.html

    I've just rescheduled lunch 12:00-12:15, so it seems to work on 42 Firefox on Windows.

    What is the latest version, where it has worked for you?

    Have you tested Mode Firefox safe to rule out the possibility of an extension conflict? See: Firefox in Safe Mode troubleshooting questions.

  • Cross-origin request blocked: the same political origin does not read the remote resource

    while trying to perform the CORS get request I get this error:
    Cross-origin request blocked: the same political origin does not read the remote resource
    In chrome it works fine.
    I'm using firfox version 29

    A good place to ask for advice on web development is the forum mozillaZine 'Web Standards Development/evangelism'.

    Aid to this forum are better informed on issues related to web development.

    You must register on mozillaZine forum site to post in this forum.

  • diskette drive 0 seek failure. If I hit f1 continue, then every thing works normally. Looks like it's looking for an active drive that does not exist

    diskette drive 0 seek failure. If I hit f1 continue, then every thing works normally. Looks like it's looking for an active drive that does not exist

    This message comes to the BIOS screen that appears before Windows starts?  If so, go to the BIOS Setup and disable the floppy drive.

  • I installed a new router (Netgear N300) wireless and my laptop is the only computer that does not connect to the internet.

    Connected to the new router, but locally only.

    Currently, I installed a new router (Netgear N300) wireless and my laptop is the only computer that does not connect to the internet. The small icon to the left of my screen says only: ACCESS: LOCAL ONLY.
    BASICALLY,.

    I have Windows Vista Home Premium, notebook Compaq (Presario CQ60 to be exact)

    I can connect if I use a cable, but its disadvantages.

    I can connect wirelessly with my PC and Ipad. and Internet access.

    I TRIED:
    Various patches microsoft such as resetting TCP, safe mode with network, reset the router. »

    Thank you in advance and we hope you can answer this soon!

    I use an Atheros AR5007 802. 11 b / g WiFi Adapter(Compaq laptop) for the moment so this is useful. Thanks again!
    Someone suggested that I update my wireless driver. I am open to this idea, if anyone can find a safe and legal site with the download.

    Hi Bryyaan11,

    You can check out the link to HP support and try to download the drivers for your wireless card updated:

    Support HP & drivers

    For more information, you can also consult the following article:

    Updated a hardware driver that is not working properly

    You can also check the following items and try the steps:

    Windows wireless and wired network connection problems

    Solve problems, find wireless networks

    Hope this information is useful.

  • I have adobe acrobat 7 Professional and I am trying to install it, but the old serial number does not work, windows 10

    I have adobe acrobat 7 Professional and I am trying to install it, but the old serial number does not work, windows 10

    See download Acrobat 7 and CS2

  • ITunes on my old MacBook Pro does not recognize my new Iphone

    ITunes on my old MacBook Pro does not recognize my new Iphone... but apparently I can't download the new version of Itunes to this model of MacBook Pro? (according to the message that I get)... So I can't transfer my photos / apps / data, etc., for my new phone... Does anyone have advice?

    Thank you

    It is not so much the Macbook Pro model as what operating system your help, for example, if you're running Lion and trying to download Itunes for El Captian. Impossible to run your operating system which. Updates for your system come from apple. Ether through a software update or the Apple app store. Generally, you will receive a notification if an update is available. What operating system you're running and what Iphone model? IPhone 6plus has for example need OS 10.7.5 or newer.

  • Why the button "Save as" does not work in new Acrobat Reader? Very annoying...

    Why the button "Save as" does not work in new Acrobat Reader? Very annoying...

    I have already updated to the last DC v15.009.20077...

    So I found a way, if I do it just right, it works (with the file, click the "tiny" file and then save as. I made the mistake of first pressing the home much more first. Really not intuitive or easy to use even if... Looks like you have replaced the button "save under" with the "save in the cloud." We use mettle at work, and the cloud of Adobe is irrelevant for me...

  • Bought two of the iTouch, one for my wife and one for me. In the Notes his has the "" symbol for the formatting and mine does not work. Any suggestions?

    I bought the iTouch two at a time, one for my wife and one for me. In the application 'Notes' my wife shows the symbol "+" to the formatting and mine does not work. Any suggestion.

    Could you please include screenshots of the so-called issue?

  • Update Windows automatically uninstalls the old updates that are not required?

    I recently installed my OS with the CD from the laptop that my system has been crushed. After you install a new Visa OS with laptop manufacturer's CD, he asked to install recent updates. The update of windows has installed the recent update one by one and themselves 237 update of windows which is really eating my disk space. Updates Windows automatically uninstalls the old updates that aren't necessary?

    Hello Stephen,.

    you hav to understand that there is no unwanted updates

    the best way to wat you can do is to install service pack 1 and 2 will have all nessaccery updates.

    You can find more information on this link

    http://support.Microsoft.com/kb/935791

    I hope you like my suggestions. Please mark as if you think that the suggestion to have fullfilled your quiry!

    cheeers

  • Column definition for the filling of himself - does not

    Hello

    I'm trying to update a column in a table by using the following code:
    UPDATE pweb.pweb_tos
       SET tos_code = TRIM(tos_code);
    For some reason, it does not. When I select the column using the TRIM function he trims white space, but the update does not work.

    Besides - I do a dump (tos_code) of the column and checked that it is actually a white space at the end.

    Any help would be appreciated...

    Thank you!
    Christine

    What is the CHAR or VARCHAR2 data type?

    If it is of type CHAR, it can not be cut.

  • Line for the Hover draw style does not work in Internet Explorer

    I found a great way to create a substitution effect when you hover over a table row, giving the row a class of "resultsRow" and using the following rules in my stylesheet:

    {.resultsRow}
    background-color: #EAEEB1;
    }
    {.resultsRow:hover}
    background-color: #D2DE56;
    }

    It works perfectly in Firefox, but doesn't work at all in Internet Explorer, that's what will use the majority of our audience. Does anyone know a fix for this in Internet Explorer?

    The game, July 20, 2006 08:21:43 + 0000 (UTC), "Claire S.
    wrote:

    > .resultsRow {}
    > background-color: #EAEEB1;
    > }
    > .resultsRow:hover {}
    > background-color: #D2DE56;
    > }
    >
    > This works perfectly in Firefox, but doesn't work at all in Internet Explorer.
    > which is what will use the majority of our audience. Does anyone know a fix
    > in Internet Explorer?

    As you have seen, IE is old and does not support. You can do it
    quite easily with JavaScript:


    onMouseOut = "this.className = 'resultsRow'" > ""

    Gary

  • Home page is empty except for a search bar that does not work and an information bar that is empty.

    'Google' is missing from the left of the search bar, the search bar does not work, the Info window is empty, the button 'Restore previous Session' is missing and the Firefox/Google toolbar with g-mail, hot mail, cards, etc is missing.

    Try to move only the files you really need like bookmarks (bookmarks places.sqlite or restore from a JSON backup in the bookmarkbackups folder) and recorded the names and passwords (signons3.txt and signons.sqlite) and others saved form data (formhistory.sqlite) and make a backup of the files before replacing them, so that you can come back if the problem comes back.

  • Do something in the DAQmx way that does not fit? (Counter triggered on PXI-6608)

    Hello

    I want to create a counter with my PXI6608 who goes off with an external input, then counts down progressive. I so want to be able to read the County in LabVIEW and therefore to determine the time since the outbreak. I realized this before with the old code, but we know not how to do in the DAQmx way. In particular, I can't create a task because what I want to do seems to be in one of the models of task DAQmx previously envisaged.

    Can anyone help? I guess that there is a way to create an 'empty' DAQmx task so I can fill in the details with nodes in property?

    See you soon

    Lee

    You'll want to do a spot of leader board and set the source to be among the bases of internal time using a property node DAQmx (set it before you begin the task):

    The feature of cause you're looking for is called a 'start trigger arms' in DAQmx.  It is configured via a property node (also before starting the task):

    I don't know what you're getting at in regards the DAQmx task "empty."  In general, you will use the standard API to define the characteristics and nodes property for more advanced features so you'll end up with a combination of the two.  In many cases, you can replace the DAQmx API with knots of property (for a fun example, open the calendar VI DAQmx), but chances are that you might be forgetting something important so I would say always with the screw and then tacking on the nodes property for additional features when needed.

    If you use LV 2012, This example should help you get started (or if not, the image still shows you what should look like the task).

    Best regards

Maybe you are looking for