Work with half hour lines

Hi guys.

I need to fill a table with a range of half hours based on the duration of the action and my sources are described below:

-SOURCE_TABLE

-TB_EMP_ACTIONS

EMP_ID DATE STRT_ACTION END_ACTION ACTION

1 01/01/2014 08:18:25 08:31:15 SPEAKING

1 01/01/2014 09:02 09:06:39 SPEAKING

1 01/01/2014 08:00 09:30:45 CONNECTED

-CORRESPONDENCE TABLE

-LK_UP_HLF_HR

ID_HLF_HR STRT_HLF_HR END_HLF_HR

1 00:00:00 00:29:59

...

16 08:00 08:29:59

17 08:30 08:59:59

18 09:00 09:29:59

19 09:30 09:59:59

...

48 23:30 23:59:59

And I need to get this in the target table:

EMP_ID DATE ID_HLF_HR STRT_ACTION END_ACTION DURATION_ACTION ACTION

1 01/01/2014 16 08:18:25 08:31:15 00:11:34 SPEAKING *

1 01/01/2014 17 08:18:25 08:31:15 00:01:16 SPEAKING *

1 01/01/2014 18 09:02 09:06:39 00:04:39 SPEAKING

1 01/01/2014 16 08:00 09:30:45 00:30:00 LOGGEDON *

1 01/01/2014 17 08:00 09:30:45 00:30:00 LOGGEDON *

1 01/01/2014 18 08:00 09:30:45 00:30:00 LOGGEDON *

1 01/01/2014 19 08:00 09:30:45 00:00:45 LOGGEDON *

* This action start and end is between the lines, so I need to duplicate the line with the appropriate about half an hour range and correct duration

If anyone can help with this?

Hello

According to your data and your needs:

INSERT INTO target_table

(emp_id

, dt - DATE is not a column name good

id_hlf_hr

strt_action

end_action

duartion_action

action

)

SELECT a.id_emp

a.dt

h.id_hlf_hr

a.strt_action

a.end_action

, TO_CHAR ((MOINS (TO_DATE (a.end_action, «HH24:MI:SS»))))

, TO_DATE (h.end_hlf_hr, 'HH24:MI:SS') + '1' SECOND INTERVAL

)

-BIGGER (TO_DATE (a.strt_action, "HH24:MI:SS")

, TO_DATE (h.strt_hlf_hr, "HH24:MI:SS")

)

)

, "HH24:MI:SS".

)

a.action

OF tb_emp_actions one

JOIN lk_up_hlf_hr h ON a.strt_action<=>

AND h.strt_hlf_hr<=>

;

If you would care to post CREATE TABLE and INSERT instructions for 2 tables of entry, then I could test this.  (You don't have to post all 48 lines in the table of correspondence, the lines from 07:30 to 10:29:59 should be sufficient for this example.)

I guess that you can never have an action that begins to say: 23:30 and ends at 4:30 pm the next day, or an action that starts at 08:18 on January 1 and ends at 08:31 on January 3.  (I know people who can go on this long when the action is 'TALK').

Tags: Database

Similar Questions

  • The time in the calendar works with an hour between start and end time

    Until recently, calendar worked OK but now only allow me to have a time of an event if I try to put the first gestures of time within an hour of arrival times longer.

    There is a symbol link to the right of the time of departure and arrival. If the points are in contact with the time interval that you have in the calendar (by default 60 minutes) options will be kept when you change the time. Click on this symbol, and the points will be away and stop this action.

  • working with try &amp; catch in CI

    Hi all

    I'm just working with one of the Community industry through the app engine. I'm just reading intermediate table and inserting tables by CI, Structure similar to the following

    While

    Try

    Code of the component Interface

    catch

    end - try

    end-while that

    Here during the loading - when I get an error AE goes to SUCCESS No. and rest lines will not get the treatment.

    How can I just jump the line of the error, write it in the log file and continue working with the remaining lines... ? I placed try and catch also.

    Thank you

    Ely.

    Ely - you are on the right track.

    To explain what 1000452 has suggested, you will need to browse the lines across lines using the index & I.

    You can also use the long of the same statement form as follows (alternative):

    field1 = & rs1. GetRow(&i).staging - table.field1.value;

    You can find good documentation PeopleBooks to create and work with the autonomous rowsets:

    https://docs.Oracle.com/CD/E38689_01/pt853pbr0/Eng/PT/tpcd/task_UsingStandaloneRowsets-074a72.html

  • O2 iPhone 5 s phone line does not work with my map of Cyprus turkcell

    O2 iPhone 5 s phone line does not work with my map of Cyprus turkcell

    Yalcin davrandi wrote:

    O2 iPhone 5 s phone line does not work with my map of Cyprus turkcell

    OK, if the phone has been implemented using the o2 network and you want to use it with another carrier, you need to get o2 to unlock your phone.

  • I've been trying to get out of my printer and scanner works with the features, it can handle but you need the orginal software cd you can down line load a copy _ @ _. ___

    How can I get a copy of the cd that will work with your old software. I've been trying to get out of my printer and scanner works with the features, it can handle but you need the orginal software cd you can down line load a copy to * address email is removed from the privacy *

    Hi Oscar,.

    Thanks for the post.

    It seems you are trying to download the application printer and scanner. Please answer the following questions, which will help us to guide you in the right direction.

    1. What is the brand and model of the printer?

    Suggestions for a question on the help forums

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

    Send us more information to help you better, we will be happy to help you!

  • Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Friday, July 20, 2012 14:35:27 + 0000, GastonBriatore wrote:

    Hi, im working with 2 1920 * 1080 monitors and you want to display a background thar image is on a resolution of 3840 * 1080 and I wanted to be half on each monitor. can u help me?

    Windows does not allow you this. However, you might be able to find a
    third party program that could do this.

    Ken Blake, Microsoft MVP

  • I worked with a license for more than a year and a half. It should expire in October 2016 but my cc told me all of a sudden I do not have a license and my trial is over. How can I fix it

    I worked with a license for more than a year and a half. It should expire in October 2016 but my cc told me all of a sudden I do not have a license and my trial is over. How can I fix it

    Hello

    Your Forum ID associated email address shows no subscription associated with it. Make sure you use the right email address to connect to cc.

    You can also have a look at the following links for that matter.

    Stop Creative Cloud 2015 to return to the mode of trial

    The activation and deactivation of Adobe problems

    Adobe Creative products Cloud launch mode test on non-English operating systems

  • A pen as a tool with a diagonal line through it appeared that I cannot get rid where work around. He is NOT one of the tools on the standard toolbar. Help please

    A pen as a tool with a diagonal line through it appeared that I cannot get rid where work around. He is NOT one of the tools on the standard toolbar. Help please

    Means generally that you're trying to work on a layer locked.

  • I need to make a contour line around an illustration for a cup OPOS. I work with CS5.

    I need to get an invisible line around this image by following the outline of the image, so I can cut it with a printer OPOS. I work with CS5. Could someone help me please?

    triceratops.jpg

    Select what you want the line to encompass. copy and paste to the prior (ctrl + f). Keep what you paste selected. Open the pathfinder Panel (window > pathfinder). Click on "join". Give your new object no race / no fill.

  • Work with lines

    I worked with Adobe Illustrator for years. But one thing that always frustrated me was create a RACE around the whole image and make it display properly once I taped. I know that Adobe Photoshop has a option "Interior race" so that the race looks in the object is stroked. However, I don't see with Adobe Illustrator. Am I missing something? According to me, the race continues to be expansion and some of them moves outside the canvas. If someone could directly on how to solve this problem I would be very happy.

    Thank you.

    Select the object, then:

  • ZoneAlarm PRO browser extension does not work in FF18, is it planned to work with ZA to resolve this incompatibility?

    Update FF18 in January or December, received the warning that my security extension for the browser ZoneAlarm Pro (or add-on?) is not compatible and has been disabled.

     I contacted Zonealarm and was told they were working on a fix.
     In the past, they have always released a fixed extension within a few days of a new FF release, so I waited for a week, but nothing.
     I then contacted ZA and the agent said I should revert back to FF17, but when I researched that with Mozilla, it was strongly advised NOT to roll back to FF17 (I couldn't figure out how to do so at the FTP site anyway), so I got back to ZA and was told in January that a fix should be released in 2-3 weeks.
     It has been 6 weeks now and NOTHING from ZA.
     I just spent an hour on-line with ZA and eventually was told they may never release a fix so ZAPro will work with FF18...that agent today wouldn't give me any info, even whether they were working to fix it or not...his solution was to use IE which is something I will NOT do.
     I would just like to know whether Mozilla plans to work with Zonealarm to address this problem or not so I can try to decide what to do.
     I HATE browsing with no firewall, so the follow-up question is whether you are aware of some other firewall (preferably free) that I can ALSO use with my installed ZAPro firewall and incorporate that other firewall to just work with FF18 and allow ZAPro to be my primary firewall for all other protection.
     Any help would be appreciated because I'm thoroughly disgusted with ZA at this point for hanging me (and thousands of other FF users) out to dry with NO protection when browsing.
     Also, by using FF18 by itself with just an AV program (eset NOD32), what security exposure am I incurring by not having any firewall protection in place?
    

    Any suggestions would be greatly appreciated.

    Thank you
    Chas Pearson

    Running Win XP MCE SP3 with all updates from MS on CPU double 3.8 g, 3 G of RAM

    OK, first of all, update Firefox 19. Then run the Zonealarm updates.

    Please note that the extension of Zonealarm does nothing for the impact on the security of your computer (zonealarm still work without the extension), and stay on an older version of Firefox is a security risk. Thus, for most security, be updated with Firefox and disabling extension of Zonealarm are more secure that obsolete in Firefox and Zonealarm

  • PC started to freeze in the half hour after every start.

    Dear Sir or Madam:

    I use Thunderbird Portable (TBP) on a USB for the management of the emails under VISTA Biz (Toshiba Dynabook SS).  A month ago, I transferred my files a 32 GB EMTEC for a 64 GB Patriot TBP.  Meanwhile, around the same time, the PTB is automatically updated to V12 V13, then the problems began.  4 minutes after the beginning of the PTB a warning: ' Script does not! [Continue] or [Skip]. »

    After clicking [continue] 6 to 7 times every 4 minutes or so, finally the TBP window appears in about half an hour, but subfolders are broken.  Most of them show no email list, that I rescued before.

    After this problem, my PC freezes completely every half hour or so, even with the USB plugged in.

    I ran PC diagnostics, but no problem was found.  I did a full disk cleanup, disk scanning and defragmentation of the PC - HD and the USB and no problem.

    Could you tell me what could be the cause and how can I recover it?

    I put the system at the point of most ancient available recovery point, so I can't go further than that.  Is there a way to develop recovery back after 3 or 4 months?

    Thanks in advance for your help.
    Kind regards
    Ken

    Hello

    1 should I have any problem at the opening of applications other than Thunderbird Portable?

    You can follow the suggestions mentioned below and check with the question.


    Method 1:
    Step 1: Try to restart your computer in safe mode, open Thunderbird Portable and check.
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode
    If it works fine in safe mode, try to perform a clean boot in order to find the root cause.
    Step 2: Perform the clean boot using the suggestions mentioned in the link mentioned below.
    http://support.Microsoft.com/kb/929135
    NOTE: once you check the clean boot feature configure Windows to use a Normal startup using step 7 proposed in the above mentioned link.
     
    Method 2:
     
    Method 3: Uninstall Thunderbird Portable 13 version and install version 12 to check with the question.
      
    You can also check with toshiba
     
    I hope this helps!
  • working with Pages

    I just started working with Pages, I want to use it to prepare invoices. Everything seems to work fine except for a problem... For example if I get 100.00 it seems ok, but then when I go to the next line, it changes and the DOS.00 after the 100 are not, here are 2 screenshots to show thatI guess it's probably a simple solution, of ideas? Thank you

    In the v5.6.2, Pages I updated always officially my cell range of currency data format cell currency as shown below.

  • My Clickfree automatic backup drive has stopped working, with my iMac, what is the best replacement to use with Time machine

    My Clickfree automatic backup drive I had for many years stopped working with my iMac, what is the best replacement to use with Time Machine.

    I can't even reformat the drive to try to start over, then think its time I invested in a high today but don't know where start looking so any advise would be a great help.

    Thank you guys

    A lot of users on these forums recommend OWC (www.macsales.com) Mercury Elite Pro series JEP due to their durability, affordability and quality of construction. I have about 6 of them connected to my iMac and have never had a speaker to fail. When a hard drive fails, substitute is a 5-minute process to re - use the box. To help you get started, you can find the line to: https://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB

    You can find them in various ways and with a variety of configurations of connection so you can find the one that best fits your needs.

    Good luck!

  • I've updated the plug ins and it worked for 3 hours. What now?

    I was unable to watch the videos on my laptop. I have windows. I clicked on update my plugins and it worked for 3 hours. I even disconnected and then when I restarted the "keep your firefox healthy" right page went up and update plugins is still 'twirling '. Help

    in general only versions out-of-date Flash need to be activated, please install the update through https://www.mozilla.org/plugincheck/

    If you have problems with this, try the offline installers offered by adobe to https://www.adobe.com/products/flashplayer/distribution3.html instead (for firefox download & install the exe windows for "browser plugin").

Maybe you are looking for

  • Custom Sidebar settings / profile manager / El Cap

    Hello This has been a bug for some time bear.  Basically, I want to customize my file sidebar.plist for my managed network users.   Manager profile account settings 'finder '.  If I upload my sidebar.plist to the profile under custom settings manager

  • Satellite PSKJNR L50 - A - 10 Windows and hibernation buggy

    Hello! I have updated to Windows 10 L50 - A PSKJNR book.And I lit on that hibernation. After that the hibernation of update worked fine, but after my Windows 10 had two updates of Microsoft System. After that the second update took place on 13 and 14

  • Fusion drive not bootable or mountable, although first aid shows fine

    My end of 2014 iMac won't start anyway except the Safe Mode. When I run disk utility, I see the "Internal" drive and volume "Macintosh HD": the two check-out OK if I run first aid on them. However, as you can see on the screenshot attached: it shows

  • noise of 9205

    Hello everyone, I'm having a problem of balancing slot chassis and signals acquisition facility space.  Systems cRIO I built in the past used maps 9219 universal to acquire my signals analog 4-20mA.  However, I found that to 4 channels per card cost

  • Pavilion 14-v229TX: computer keyboard pavilion laptop 14-v229TX

    I just got my new pavilion laptop, but have some of the keyboard problem. For example, the '@' is not no key "shirt + 2" and is the key "shirt +'". "." Some problem happen on other simbol of a few institutions. Please advice what should I do? Thank y