Punching of Anomalies

Hello

I now of paintings

TBL1: WORKTIMINGS

This table stores daily worktimeing of employees.

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

EMPID STARTTIME ENDTIME

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

TBL2:OVERTIME

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

EMPID OTFRM OTTO

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

TBL3:SETTINGS

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

PRESHIFTMINS POSTSHIFTMINS

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

TBL4:PUNCH

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

EMPID INPUNCH OUTPUNCH

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

There is only one line in the table above.

Suppose that preshiftmins = 30 and postshiftmins = 60

This means, the employee can punch 30 minutes before

his shift starts and that the employee is allowed to punch in the 60 minutes after his shift.


The same rule applies to overtime. That is to say

the employee can punch 30 minutes before

his additional starts and that the employee is allowed to punch in the 60 minutes after overtime.

I need a punching based on the above rule exception report.

Here an exception is if overtime begin in the 60s (according to the table of parameters) minutes after his shift.

the employee can continue up to the end of overtime.

For example:

worktimings for employee 1

21/01/2014 08:00 to 16:00 21/01/2014

Overtime for the same day is 21/01/2014 16:30 to 18:30 21/01/2014

So to this day, all the punches between 21/01/2014 07:30 and 19:30 01/21/2014 are valid.

For example: 2

====

worktimings for employee 1

21/01/2014 08:00 to 16:00 21/01/2014

Overtime for the same day is 21/01/2014 18:30 to 21/01/2014 23:30

So to this day, all the punches between 21/01/2014 07:30 and 17:00 21/01/2014 are valid.

also punches between 21/01/2014, 00:30, 18:00-22/01/2014 are valid.

I need a report to know the invalid punches.

For example:

=======

In the following example 2 punches are not valid.

21/01/2014 06:00 to 12:00 21/01/2014

21/01/2014 12:30 to 21/01/2014 23:30

I use oracle 10g

examples of data

============

create the table settings (select 1 empid, 30 preshiftmins, 60 double postshiftmins);

create additional table as hours

(select 1 empid, to_date (21 January 2014 16:30 ',' mm/dd/yyyy hh24 ') otfrm, to_date (21 January 2014 23:30 ',' mm/dd/yyyy hh24 ') double otto)

);

create the table worktimings as

(select 1 empid, to_date (21 January 2014 08:00 ',' dd/mm/yyyy hh24 ') starttime, to_date (21 January 2014 16:00 ',' dd/mm/yyyy hh24 ') double endtime)

Union of all the

Select 1 empid, to_date (22 January 2014 00:00 ',' dd/mm/yyyy hh24 '), to_date (22 January 2014 08:00 ',' dd/mm/yyyy hh24 ') of double

Union of all the

Select 2 empid, to_date (21 January 2014 08:00 ',' dd/mm/yyyy hh24 '), to_date (21 January 2014 16:00 ',' dd/mm/yyyy hh24 ') of double

);

create table like punches

(select 1 empid, to_date (21 January 2014 08:00 ',' dd/mm/yyyy hh24 ') inpunch, to_date (22 January 2014 08:00 ',' dd/mm/yyyy hh24 ') outpunch the double)

Union of all the

Select 2 empid, to_date (21 January 2014 08:00 ',' dd/mm/yyyy hh24 '), to_date (January 22, 2014 12:00 ',' dd/mm/yyyy hh24 ') of double

Union of all the

Select 2 empid, to_date (21 January 2014 00:00 ',' dd/mm/yyyy hh24 '), to_date (22 January 2014 18:00 ',' dd/mm/yyyy hh24 ') of double

);

Here, the output would be

EMPID INPUNCH OUTPUNCH

2 21/01/2014 00:00 21/01/2014-18:00

Help, please

Hello

Krishna Devi Vinayaka says:

On this basis, I arrived without authorisation periods IE. space between each retailer periods.

Then I select all the inpunches and the punches that straddles these unauthorized periods.

Here, while getting the next start time, there are two questions.

(1) next launch may be less at the present time end

(2) if there is no other record next departure is null.i this case, I select payroll enddate IE. 20/02/2014.

...

I think you are taking the wrong approach.  You try to identify the periods not allowed as the gaps between the authorized periods and then see if punch took place in a non-authorised period.  It seems that it would be easier to find the punches that didn't take place during authorized periods, which is what I did in response #1 two weeks ago, and you said which produces erroneous results anyway.  If I understand the problem now, not only must the in-punch out - Punch of each line in certain authorized period, the two hallmarks of this line must be in the same period allowed, where a 'permitted period' is 1 or more lines of the worktimings tables and/or overtime which overlap, or at least have not a gap between them.  This is what the query in response #10.  The column new_shift (calculated in the subquery called got_new_shift) identifies if a work period begins a period authorized or not, seeking at all times of previous work via the analytical MAX function).  If all of these earlier periods ended before the beginning of the current, then (and only then) it starts a new period authorized.  The following subquery, got_shift_num, uses the analytical ACCOUNT works to see how many authorized periods have started to date, indicating which authorized period each work period belongs.  Once we know, we can use the functions MIN and MAX of aggregation for a fine when each authorized period begins and ends.  This is what the movement of subquery combined.

Tags: Database

Similar Questions

  • punch in the click causes

    Logic Pro X punch in recording gives a click at the entrance and exit points.  Is there a trick or to avoid this?  Thank you.

    1 / you should try to punch when silent (if possible)

    2 / If you drill in overlay mode you should be able to adjust one side of the original in order to smooth, it

    3 / even better punch with recording to enabled so that you can it comp and move all sides

    4 / cross melted add the splice should make a big difference in click/pop

    5 / with the above try splicing the passage by zero when possible

    6 / finally punch early in order to modify the endpoint of splicing (again in overlap)

  • Recording disabled after having accidentally automatic punch in and out

    Sorry if this is an obvious question, but I can't seem to find a way to get him...

    While he was recording an audio track, I clicked within the chronology of the creation of a white vertical line in the track where I clicked on a software instrument track. This triggered the auto punch and punch red car bar appeared (a feature that I have not yet used). I searched the community and learned activate you perforation auto off with control + Option + command + P... it turned off, but it also disabled the recording track.

    After turning off the auto punch, the track I was recording monitors still audio entering until what I hit the record button. But as soon as I click the button registration entrance monitoring turns off and no sound is recorded.

    You can also see this screenshot the cycle bar has yellowed a hollow. Why would that happen? (This auto punch after turning back, after accidentally allows it.) The track record on is "Ac guitar - R" - as you can see that track is selected, it seems to be enabled for the folder and 'I' is selected for an input control, but as I mentioned follow-up entry stops as soon as I click on the record button and nothing is recorded on the track...  But everything was going well until this thing of automatic punch.

    I use Logic Pro 10.2.0

    If someone with more experience can explain what happened so I can avoid it in the future, it would be a great help. Thanks in advance!

    One more thing... This cycle described yellow bars does not work like a range of cycle since that happened.

    This screencast shows what I mean: https://youtu.be/_udEsAazPeA

    I press play and playback starts from the position of the cursor instead of at the beginning of the range chosen cycle. (Ditto for trying to cycle-registration.)

    How can I turn on/off functionality of cycle to get cycling normally, with solid yellow bar?

    Also, I just leave the logic and reopened the project and tried to save a new game on a software instrument track and it will not save, even if the track is enabled for recording.

    So apparently I can't record something again in this project of song (audio or software), until I know how to fix what went wrong

  • Punch on the fly do not work since 10.2.1

    Since the logic 10.2.1. Punch (el Cap 10.11.3) old good on the fly recoding (overlap - replace) Don t work more. Punch in an existing part is cutting one behind the PunchOut! Although the audio is not lost and it is possible to reach the part carried out by hand, but not really an acceptable workflow! Does anyone have the same problem?

    Can't replace my point of view using Autopunch

  • Anomalies of programming in the C:\ drive and to the registry files?

    The system I am writing on the subject is on an Acer Aspire 5050-3785 computer laptop with Windows Vista Home Premium SP2.
    I have two annoying problems that may be related.
    One: Empty folders are created programmatically in the C:\ folder with the folder names of the form "_xxxxxx_", where folder names consist of a character to underscore as prefix and suffix, with 6 digital numbers in the middle.   These records all network service as owner, with special permissions inherited from C:\ to Traverse folder/execute the file; List folder/read data; Read attributes; Read extended attributes Create files/write data; Creation of files/add data; and read permissions.  Permissions are shown to apply to folders only.  What kind of program could create these folders?
    Two: Another question, that might be related, is the presence of Oriental characters in the prefix of many names of readers in the registry and some references the program command?  Many of these bodies are in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EMDMgmt.  My language setting is for English only.
    Can someone please explain these anomalies and may offer suggestions for the procedure?  Thank you.

    Whatever the program creates files is a program in execution, so the best way to know is to stop running programs and the figure on which we did.

    Run the command MSCONFIG and uncheck all programs on the Startup tab.  Reboot and see if it persists.  If not, add a program or two until you find the cause.

    EMDMgmt is a ReadyBoost service.  This page has some details and said that "EMD" stands for 'external memory device'.

  • Android 2.2 Bug & Anomalies

    Hello

    Someone had to start this...

    I read the 2.2 upgrade materials and find no mention of bugs, anomalies or the following devices:

    Home screens is no longer turning.  Screen auto-rotation of images is checked.  This behavior started right after the download.  Once I open an application, the automatic rotation of images works OK.  More weird, auto-rotation works when the Droid is moored.

    Although the value of the timeout never when docked, new 'feature' of floating-date & time screen saver turns on after a minute.  The screen saver is mentioned in documents of upgrade for the settings of the clock; but it does not specify how to turn it off.  So far, no applications other than the clock seem to generate a screen saver.  Why have the setting stay awake if a screen saver overrides to it?

    A minimum of six applications are constantly running.  These aren't necessarily the apps I never ran.  If I close some, new applications of pop-up.  I am aware of Task Killer.  This is a new behavior.  It's as if 2.2 push as much apps run in the background as he can.

    Prolonged pressure on host to display the recently used applications is not consistent.  Sometimes, he does not use latest apps, but instead brings in an application that has never served during this period.

    It seems that I forced firmer on some applications (Aloqa)

    I should add that I'm really happy of the update, esp, the bluetooth features and warranty and can't wait for Flash 10.1.

    Please feel free to offer suggestions or add your own questions...

    My wife & I have the Moto Droid and the home screen never turned on each phone, my wife is updated to 2.2 yesterday (I do not have) his own still does not turn.

  • Whenever I try to place materials on the House, these materials is placed on the grassy areas. Punch said update my chipset, but I have problems doing that.

    Meeting of the problems with my Punch home and landscape design V17.  Whenever I try to place materials on the House, these materials is placed on the grassy areas.  Punch said update my chipset, but I have problems doing that.  I have Intel (R) g33/g31 Chipset family 8.15.10.1825.  I'm looking for a place to download the latest updates for this system of video card.

    Go to the web site of the manufacturer of your computer.  They should have all the correct drivers for your computer brand and model.  Don't download them from any other place because who could cause problems.

    Good luck.

  • Continuous punches

    Hello

    I have the following table

    create table punchdetails)

    Select 1 empid, to_date (March 21, 2015 07:55 ',' dd/mm/yyyy hh24 ') inpunch, to_date (March 21, 2015 09:00 ',' dd/mm/yyyy hh24 ') of all outpunch the double union

    Select 1 empid, to_date (March 21, 2015 09:30 ',' mm/dd/yyyy hh24 ') inpunch, to_date (March 21, 2015 13:00 ',' dd/mm/yyyy hh24 ') of all outpunch the double union

    Select 1 empid, to_date (March 21, 2015 15:00 ',' dd/mm/yyyy hh24 ') inpunch, to_date (March 21, 2015 16:30 ',' mm/dd/yyyy hh24 ') of all outpunch the double union

    Select 2 empid, to_date (March 21, 2015 08:00 ',' dd/mm/yyyy hh24 ') inpunch, to_date (March 21, 2015 16:00 ',' dd/mm/yyyy hh24 ') of all outpunch the double union

    Select 2 empid, to_date (March 22, 2015 07:55 ',' dd/mm/yyyy hh24 ') inpunch, to_date (March 22, 2015 12:00 ',' dd/mm/yyyy hh24 ') of all outpunch the double union

    Select 2 empid, to_date (March 22, 2015 12:25 ',' dd/mm/yyyy hh24 ') inpunch, to_date (March 22, 2015 16:30 ',' mm/dd/yyyy hh24 ') outpunch the double

    )

    If the gap between punch output and then in punch is less than or equal to 30 minutes, these punches are regarded as continuous.

    Here as the punch of employee 1 out at 09:00 but he'll be back at 9:30, that gap is allowed and it is treated as he worked from 07:55 until the end of the second punch is to say 13:00

    Expected result is

    EMPID                IN                               OUT

    1 21/03/2015-07:55 03/21/215 13:00

    1 21/03/2015 15:00 03/21/215 16:30

    2 2015-21/03 08:00 21/03/215 16:00

    2 21/03/2015-07:55 03/21/215 16:30

    Can it be done in a query?

    Help, please

    I use oracle 10g

    Hello

    Here's a way

    WITH got_new_grp AS

    (

    SELECT empid, inpunch, outpunch

    CASE

    WHEN inpunch - LAG (outpunch) OVER (PARTITION BY empid

    ORDER BY inpunch

    ) > 30 / (24 * 60)

    THEN 1

    END AS new_grp

    OF punchdetails

    )

    got_grp AS

    (

    SELECT empid, inpunch, outpunch

    , CHIEF (new_grp) OVER (PARTITION BY empid

    ORDER BY inpunch

    ) AS the grp

    OF got_new_grp

    )

    SELECT empid

    MIN (inpunch) AS inpunch

    MAX (outpunch) AS outpunch

    OF got_grp

    GROUP BY empid, grp

    ORDER BY empid, grp

    ;

    I guess that the combination (empid, inpunch) is unique.

    Here's how it works:

    It is essentially a problem of GROUP BY.  We want to show that the inpunch earlier and later outpunch in each group.  It's that the main request.

    The tricky part of GROUP BY.  We can use the LAG function analytic to see where the new groups to start (what does the subquery got_new_grp) and then use the analytical function another (such as COUNT or SUM) to see how many groups have started from each line (which the subquery got_grp).

  • Punch own HDR look

    I've recently updated to Premiere Pro 2015.3 and realized that 'Own Punch HDR' appearance is no longer available in Lumetri. I've always found this to be a really useful filter and I was wondering if it is possible to download it somewhere and load it as a custom look? It would be great. Thank you.

    While in your program files, open the 2015.3 folder (as John mentions above)... Lumetri/gaze/Legacy and you can find here in this current version.

    Neil

  • Punch to deal with reviews

    I have request posted by Boneist

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

    with tsht_punchdata1 as (select 1 employee_id, to_date (February 24, 2011 08:55 ',' dd/mm/yyyy hh24 ') punchdate, 1 punchinout of all the double union)

    Select 1 employee_id, to_date (February 24, 2011 08:56 ',' dd/mm/yyyy hh24 ') punchdate, 1 punchinout of all the double union

    Select 1 employee_id, to_date (February 24, 2011 16:20 ',' dd/mm/yyyy hh24 ') punchdate, 0 punchinout of all the double union

    Select 1 employee_id, to_date (February 26, 2011 16:14 ',' dd/mm/yyyy hh24 ') punchdate, 1 punchinout of all the double union

    Select 1 employee_id, to_date (27 February 2011 16:15 ',' dd/mm/yyyy hh24 ') punchdate, 0 punchinout of all the double union

    Select 1 employee_id, to_date (March 3, 2011 08:20 ',' dd/mm/yyyy hh24 ') punchdate, 1 punchinout of all the double union

    Select 1 employee_id, to_date (March 3, 2011 16:23 ',' dd/mm/yyyy hh24 ') punchdate, 0 punchinout of double

    ),

    RES in the (select employee_id,

    punchdate,

    punchinout,

    (punchinout, 1, 1) ahead of next_punchinout (partition by employee_id order punchdate).

    When cases in advance (punchinout, 1, 1) over (partition by employee_id) stopped by punchdate = 0 and punchinout = 1

    then punchdate

    When lead (punchinout, 1, 1) over (partition by employee_id arrested by punchdate) = 1 and punchinout = 1

    then punchdate

    When lead (punchinout, 1, 1) over (partition by employee_id arrested by punchdate) = 0 and punchinout = 0

    then null

    end punch_in

    When cases in advance (punchinout, 1, 1) over (partition by employee_id) stopped by punchdate = 0 and punchinout = 1

    then lead (punchdate) over (partition by employee_id arrested by punchdate)

    When lead (punchinout, 1, 1) over (partition by employee_id arrested by punchdate) = 1 and punchinout = 1

    then null

    When lead (punchinout, 1, 1) over (partition by employee_id arrested by punchdate) = 0 and punchinout = 0

    then lead (punchdate) over (partition by employee_id arrested by punchdate)

    end punch_out

    of tsht_punchdata1).

    dummy_dates as (select to_date (February 21, 2011 ', ' dd/mm/yyyy')-1 + level dt)

    of the double

    connect by level < = to_date (March 20, 2011 ', ' dd/mm/yyyy')-to_date (February 21, 2011 ', ' dd/mm/yyyy') + 1).

    Select to_char (dd.dt, ' dd/mm/yyyy') punch_date,.

    Res.Employee_ID,

    -case when res.punch_in < dd.dt then to_char (dd.dt, ' dd/mm/yyyy hh24')

    of another to_char (res.punch_in, ' dd/mm/yyyy hh24')

    end punch_in

    When case trunc (res.punch_out) > dd.dt then to_char (dd.dt + 1, ' dd/mm/yyyy hh24')

    of another to_char (res.punch_out, ' dd/mm/yyyy hh24')

    end punch_out

    of dummy_dates dd

    legacy partition res outer join (employe_id)

    on ((dd.dt between trunc (coalesce(res.punch_in, res.punch_out))

    and trunc (coalesce(res.punch_out, res.punch_in)))

    and not (res.punchinout = 0 and res.next_punchinout = 1))

    employe_id order, dd.dt;

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

    I want to get a punch of above data anomaly report.

    That is to say. only the dates for which there is no punch must be posted. Also the punch must not be cut into different dates.

    Here, the result would be...

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

    EMPLOYE_ID PUNCH_IN PUNCH_OUT

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

    1 24/02/2011-08:55 < NULL >

    1 24/02/2011 08:56 02/24/2011 16:20

    1 26/02/2011 16:14 27/02/2011 16:15 (not cut in two)

    1 3/3/2011 08:20 3/3/2011 16:23

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

    Please provide me with the request and I want to save this sql as the view in the name of "Punchtoprocess".

    I want the result of the first query (for all dates between two given dates and shares also at different dates.) by querying the view of "Punchtoprocess", tsht_punchdata, table etc...

    is this possible?

    Hello

    Here's one way:

    WITH got_r_num AS

    (

    SELECT employe_id, punchdate, punchinout

    , ROW_NUMBER () OVER (PARTITION BY employee_id - just guessing

    ORDER BY punchdate

    ) AS r_num

    OF tsht_punchdata1

    )

    SELECT employee_id NVL (i.employee_id, o.employee_id)

    i.punchdate AS punch_in

    o.punchdate AS punch_out

    Got_r_num I have

    FULL OUTER JOIN got_r_num o ON o.employee_id = i.employee_id

    AND o.r_num = i.r_num + 1

    AND o.punchinout <> i.punchinout

    WHERE i.punchinout = 1

    OR o.punchinout = 0

    ORDER OF NVL (i.employee_id, o.employee_id)

    NVL (punch_in, punch_out)

    ;

    To give an opinion, simply add "CREATE OR REPLACE VIEW view-name AS" at the beginning and omit the ORDER BY clause:

    VIEW to CREATE or REPLACE pucntoprocess

    AS

    WITH got_r_num AS

    ...

    WHERE i.punchinout = 1

    OR o.punchinout = 0

    ;

  • Punches of employee treatment

    I have the following query to display in and out punch to punch in two different columns depending on the type of punch.

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

    with tsht_punchdata as (select 1 employee_id, to_date (February 24, 2011 08:55 ',' dd/mm/yyyy hh24 ') punch_time, 'in' punch_type of all the double union)

    Select 1 employee_id, to_date (February 24, 2011 16:20 ',' dd/mm/yyyy hh24 ') punch_time, 'out' punch_type of all the double union

    Select 1 employee_id, to_date (February 26, 2011 16:14 ',' dd/mm/yyyy hh24 ') punch_time, 'in' punch_type of all the double union

    Select 1 employee_id, to_date (27 February 2011 16:15 ',' dd/mm/yyyy hh24 ') punch_time, 'out' punch_type of all the double union

    Select 1 employee_id, to_date (March 3, 2011 08:20 ',' dd/mm/yyyy hh24 ') punch_time, 'in' punch_type of all the double union

    Select 1 employee_id, to_date (March 3, 2011 16:23 ',' dd/mm/yyyy hh24 ') punch_time, 'out' of the double punch_type

    ),

    RES in the (select employee_id,

    punch_time,

    punch_type,

    lead (punch_type, 1, 'in') on next_punch_type (partition by employee_id order punch_time).

    cases when lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'out' and punch_type = 'en '.

    then punch_time

    When lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'in' and punch_type = 'en '.

    then punch_time

    When lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'out' and punch_type = 'out '.

    then null

    end punch_in

    cases when lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'out' and punch_type = 'en '.

    then lead (punch_time) over (partition by employee_id arrested by punch_time)

    When lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'in' and punch_type = 'en '.

    then null

    When lead (punch_type, 1, 'in') over (partition by employee_id arrested by punch_time) = 'out' and punch_type = 'out '.

    then lead (punch_time) over (partition by employee_id arrested by punch_time)

    end punch_out

    of tsht_punchdata).

    dummy_dates (select min_dt - level dt + 1

    from (select min (trunc (punch_time)), min_dt,

    Max (trunc (punch_time)) max_dt

    of tsht_punchdata)

    connect by level < = max_dt - min_dt + 1).

    Select to_char (dd.dt, ' dd/mm/yyyy') punch_date,.

    Res.Employee_ID,

    -case when res.punch_in < dd.dt then to_char (dd.dt, ' dd/mm/yyyy hh24')

    of another to_char (res.punch_in, ' dd/mm/yyyy hh24')

    end punch_in

    When case trunc (res.punch_out) > dd.dt then to_char (dd.dt + 1, ' dd/mm/yyyy hh24')

    of another to_char (res.punch_out, ' dd/mm/yyyy hh24')

    end punch_out

    of dummy_dates dd

    legacy partition res outer join (employe_id)

    on ((dd.dt between trunc (coalesce(res.punch_in, res.punch_out))

    and trunc (coalesce(res.punch_out, res.punch_in)))

    and not (res.punch_type = 'out' and res.next_punch_type = 'en'))

    employe_id order, dd.dt;

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

    The output of the above query is the following and is correct. Thank you Boneist for this

    PUNCH_DATE EMPLOYE_ID PUNCH_IN PUNCH_OUT

    24/02/2011 1 24/02/2011 08:55 02/24/2011 16:20

    25/02/2011 1 < NULL > < NULL >

    26/02/2011 1 26/02/2011 16:14 27/02/2011 00:00

    27/02/2011 1 27/02/2011 00:00 27/02/2011 16:15

    28/02/2011 1 < NULL > < NULL >

    2011-01-03 1 < NULL > < NULL >

    03/02/2011 1 < NULL > < NULL >

    03/03/2011 1 3/3/2011 08:20 3/3/2011 16:23

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

    But I need the output between the two dates.

    For example. from 21/02/2011 to 20/03/2011

    So there will be all the dates between these two dates, and as there is no punches for most of the day put the output would be null for them both to the punch.

    Rest of the requirement such as splitting of the punches in dates remains the same...

    Help, please

    If you mean you want to list all the days between two dates and then see the any corresponding punch in / outs, you can simply change the subquery dummy_dates to change the range, for example:

    with tsht_punchdata as (select 1 employee_id, to_date('24/02/2011 08:55', 'dd/mm/yyyy hh24:mi') punch_time, 'in' punch_type from dual union all
                            select 1 employee_id, to_date('24/02/2011 16:20', 'dd/mm/yyyy hh24:mi') punch_time, 'out' punch_type from dual union all
                            select 1 employee_id, to_date('26/02/2011 16:14', 'dd/mm/yyyy hh24:mi') punch_time, 'in' punch_type from dual union all
                            select 1 employee_id, to_date('27/02/2011 16:15', 'dd/mm/yyyy hh24:mi') punch_time, 'out' punch_type from dual union all
                            select 1 employee_id, to_date('03/03/2011 08:20', 'dd/mm/yyyy hh24:mi') punch_time, 'in' punch_type from dual union all
                            select 1 employee_id, to_date('03/03/2011 16:23', 'dd/mm/yyyy hh24:mi') punch_time, 'out' punch_type from dual
                          ),
                    res as (select employee_id,
                                   punch_time,
                                   punch_type,
                                   lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) next_punch_type,
                                   case when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'out' and punch_type = 'in'
                                             then punch_time
                                        when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'in' and punch_type = 'in'
                                             then punch_time
                                        when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'out' and punch_type = 'out'
                                             then null
                                   end punch_in,
                                   case when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'out' and punch_type = 'in'
                                             then lead(punch_time) over (partition by employee_id order by punch_time)
                                        when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'in' and punch_type = 'in'
                                             then null
                                        when lead(punch_type, 1, 'in') over (partition by employee_id order by punch_time) = 'out' and punch_type = 'out'
                                             then lead(punch_time) over (partition by employee_id order by punch_time)
                                   end punch_out
                            from   tsht_punchdata),
            dummy_dates as (select to_date('21/02/2011', 'dd/mm/yyyy') -1 + level dt
                            from   dual
                            connect by level <= to_date('20/03/2011', 'dd/mm/yyyy') - to_date('21/02/2011', 'dd/mm/yyyy') + 1)
    select to_char(dd.dt, 'dd/mm/yyyy') punch_date,
           res.employee_id,
           case when res.punch_in < dd.dt then to_char(dd.dt, 'dd/mm/yyyy hh24:mi')
                else to_char(res.punch_in, 'dd/mm/yyyy hh24:mi')
           end punch_in,
           case when trunc(res.punch_out) > dd.dt then to_char(dd.dt + 1, 'dd/mm/yyyy hh24:mi')
                else to_char(res.punch_out, 'dd/mm/yyyy hh24:mi')
           end punch_out
    from   dummy_dates dd
           left outer join res partition by (employee_id)
                                         on ((dd.dt between trunc(coalesce(res.punch_in, res.punch_out))
                                                            and trunc(coalesce(res.punch_out, res.punch_in)))
                                             and not (res.punch_type = 'out' and res.next_punch_type = 'in'))
    order by employee_id, dd.dt;
    
    PUNCH_DATE EMPLOYEE_ID PUNCH_IN         PUNCH_OUT
    ---------- ----------- ---------------- ----------------
    21/02/2011           1
    22/02/2011           1
    23/02/2011           1
    24/02/2011           1 24/02/2011 08:55 24/02/2011 16:20
    25/02/2011           1
    26/02/2011           1 26/02/2011 16:14 27/02/2011 00:00
    27/02/2011           1 27/02/2011 00:00 27/02/2011 16:15
    28/02/2011           1
    01/03/2011           1
    02/03/2011           1
    03/03/2011           1 03/03/2011 08:20 03/03/2011 16:23
    04/03/2011           1
    05/03/2011           1
    06/03/2011           1
    07/03/2011           1
    08/03/2011           1
    09/03/2011           1
    10/03/2011           1
    11/03/2011           1
    12/03/2011           1
    13/03/2011           1
    14/03/2011           1
    15/03/2011           1
    16/03/2011           1
    17/03/2011           1
    18/03/2011           1
    19/03/2011           1
    20/03/2011           1
    

    Is that what you're looking for? Of course, when I've hardcoded date values in the subquery dummy_dates, you would use bind variables in your code. In addition, the to_chars in the final select statement I added only to facilitate the display of the results; If the results will be used elsewhere (for instance... to insert into another table), I recommend removing the to_char and leaving it just in DATE format.

  • Hide elements of punch out?

    Hello

    We want to hide some elements of a punch out. This PunchOut is hosted by our provider.

    What is the best way to do it.

    We plan to remove the mapping in e-Commerce Gateway > code of the Conversion values.

    We need hide these items temporarily i.e. for 2 months and then things come back. It's that we have all the elements that are hidden, visible again.

    What is the best way to achieve this.

    In e-Commerce Gateway > code Conversion values, if we change the steering column to the OUTPUT of the current IN, is that not?

    When you want to make visible, we can define again he and po

    Please let me know if it works.

    Kind regards

    Briggette

    Hi Briggette,

    The best option is for the vendor to not display items in their catalog for your organization, if possible, on their side.

    Mapping and the content area will limit the items once the cart is returned to the iProcurement, and it will give errors because of the restriction in the Fund. But users will be able to select the element in the supplier site, if they are visible.

    Thank you

    Clarino

  • punch line beaded?

    Hello.

    I am aware of the transparent route option and have used illustrator for many years but never quite get my head around it.

    So, I have a circle, then an inner circle that looks a bit like sewing. I want the seam (just a dotted line) to pierce the rear circle so its transparent.

    I can't make it work, no!

    My understanding is it not more difficult that to expand appearance then the compound path with the rear circle, but translates a half in half the damage. I can simply not dotted, if extended line or do not pierce the rear circle. How can I do this? (other that give it up, as I often do and pressing photoshop)

    Gareth,

    With Clip uniticked and mask invert checked, you should have all the black visible and only white punching dashes through, so you can see the bottom.

    A failure that something must be sick Illy, in which case you can try the list.

    Sometimes, (some) things may fail or stop working for no apparent reason. When (other) possible reasons/remedies do not work, it is perhaps a kind corruption (temporary or permanent), or even preference settings which disturbs, which can be cured with something on the following list put in place in order to provide a catch-all solution for otherwise intractable cases. It starts with a few easy suggestions and safe) 1 and 2) for cases less serious and goes two ways 3) and 4) to reset the default preferences (easily but irreversibly and more laboriously but more completely and also reversible), then follows a list 5) various other possibilities, and it ends with a complete reinstallation 6). If no other suggestion doesn't work, or if no other suggestion appears, you can start on the list and decide how to go or who can apply.

    The following is a general list of things, try when

    (A) the question is not in a specific file,

    (B) you have a printer installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper), and

    (C) It is not caused by problems with opening a file from external media (see below).

    You tried/made some of them already; 1 and 2) are easier for temporary strangenesses and 3) and 4) specifically may be corrupted/inconvenient preferences); ((5) is a list in itself and 6) is the last resort.

    If possible / there is, you must record a current work first, of course.

    (1) close Illy and open again.

    (2) restart the computer (you can make up at least 5 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) move the folder (follow the link with this name) with closed Illy (more tedious but also more thorough and reversible), for CS3 - CC you can find the file here:

    https://helpx.Adobe.com/Illustrator/KB/preference-file-location-Illustrator.html

    5 look through and try the relevant among the other options (click on the link with that name, item 7) is a list of the usual suspects among other applications which can disturb and confuse Illy, point 15) applies to the maybe CS5, CS6 and CC);

    Even worse, you can:

    6 (A) uninstall (check the box to delete the preferences, if any), B) run the cleanup tool (if you have CS3/CS4/CS5/CS6/CC) and C) reinstall. It is important to use this step three way: otherwise, things may persist.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • Anomalies of a virtual machine "not yet calculated.

    First of all, I read the other thread which asked this same question, but the answer he does not apply to my situation.

    I'm under VCOPs 5.8.1 in a test environment. To test VCOPs behavior that I put in place 5 scenarios that exercise the CPU using a freeware tool called HeavyLoad. All scenarios are different, but repeat their behaviour on not more than a weekly pattern. For example, scenario 1 works the CPU at a constant 25% and 2 peaks - a 75% the Mar of 5-23:00 and on Friday from 8-12 a.m.. example no. 5 running the CPU at 100% for 3 minutes and then stop for 3 minutes and it repeats continuously.  The scnearios began to run at the beginning of August, while they all worked for 2 months. There is no other application on the servers and no users connect.  It shows the spikes, etc., as well as anomalies and that makes sense howerver all 5 have not established "Normal" for anomalies. Interestingly, when you look at the dynamic thresholds, it "knows", for example, that Friday, 8-12 has a greater use because the dynamic threshold has increased.

    Supossedly VCOPs teaches what 'normal' anomalies and then can tell you when you have something that is the true anomaly. I want to test is once the anomalies have established 'normal', I want to add an extra pick and who should be able to there's a new anomaly. Basically, I want to prove that he can correctly identify and draw attention to the real anomalies. Anyone have any ideas?

    Anomalies and dynamic thresholds are closely related. Dynamic thresholds are the thresholds that are learned after 7 days and establish the slices tighter to the thread of what follows if or 4 weeks. When a measured value falls outside this dynamic threshold, it becomes a fault alarm. If a value falls under this dynamic threshold, it is not an anomaly. If your recurring data (at any particular time, it is important only if it is a vC model Ops may correspond to an algorithm to wait/predict it) who became a dynamic threshold will not be considered an anomaly. However, if you have measured values which produces ad hoc or irregular, this will probably double pop up like an anomaly alarm.

    If you want to test anomalies... Just do a value (metric) do not enter the dynamic threshold (indicated by a gray band on a chart). vC Ops he'll call.

  • How can I trace back and punch a logo that you can see through it?

    I have a picture of the png logo located over a black background. I am trying to trace and punching my logo, so you can see through it. I did it with text, but I can't seem to get out right with a png image.

    dmydring,

    The best way is to recreate the logo as the vector illustrations, using the relevant tools. After that, you can use Object > compound path > Make or Pathfinder > before or a mask opacity.

Maybe you are looking for