Let avail

Hello

I now of paintings

create the table leaveavail as

(select 1 empid

TO_DATE (' 21/10/2014 ',' dd/mm/yyyy') as leavefromdate,

0 as fromdatetype,

to_date('25/10/2014','dd/mm/yyyy') leavetodate,

0 as the double todatetype

)

create the table shiftdetails as

(

Select 1 empid

TO_DATE (' 21/10/2014 ',' dd/mm/yyyy') as shiftdate,

TO_DATE (20 October 2014 23:30 ',' mm/dd/yyyy hh24 ') as shiftstarttime,

TO_DATE (October 21, 2014 07:30 ',' mm/dd/yyyy hh24 ') as the double shiftendtime

Union of all the

Select 1 empid

TO_DATE (' 25/10/2014 ',' dd/mm/yyyy') as shiftdate,

TO_DATE (October 25, 2014 07:30 ',' mm/dd/yyyy hh24 ') as shiftstarttime,

TO_DATE (October 25, 2014 15:30 ',' mm/dd/yyyy hh24 ') as the double shiftendtime

)

table Details update

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

EmpID payrolldate shiftfrom translated Maj

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

1 21/10/2014 20/10/2014 23:30 21/10/2014 First 07:30

1 25/10/2014 25/10/2014 07:30 25/10/2014 15:30 second

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

There are three shifts around the clock.

23:30 - 07:30 is the first post.

07:30 - 15:30 is the second shift.

15:30 - 23:30 is the third shift.

In the leaveavailing table.

the employee's leave on 21/10/2014-10 25, 2014.

the fromdatetype indicates if the day where begins the leave leave throughout the day.

0 indicates the full day

1 indicates half (firsthalf) leave

and 2 indicates half a day (secondhalf).

Similarly, the day the leave ends can be one of these categories.

Thus, in the table above, it indicates that leave is 5 full days continuous

based on the shiftdetails I get leave 21/10/2014-10 25, 2014 as

20/10/2014 23:30 to 15:30 25/10/2014.

That is, if the fromdatetype is 0 then fromdate will be stored in shiftdetails corresponding shiftfrom

If this day is 0 so far will be translated corresponding stored in the shiftdetails table

Help, please

I use oracle 10g

Hello

Krishna Devi wrote:

Hello

I now of paintings

create the table leaveavail as

(select 1 empid

TO_DATE (' 21/10/2014 ',' dd/mm/yyyy') as leavefromdate,

0 as fromdatetype,

to_date('25/10/2014','dd/mm/yyyy') leavetodate,

0 as the double todatetype

)

create the table shiftdetails as

(

Select 1 empid

TO_DATE (' 21/10/2014 ',' dd/mm/yyyy') as shiftdate,

TO_DATE (20 October 2014 23:30 ',' mm/dd/yyyy hh24 ') as shiftstarttime,

TO_DATE (October 21, 2014 07:30 ',' mm/dd/yyyy hh24 ') as the double shiftendtime

Union of all the

Select 1 empid

TO_DATE (' 25/10/2014 ',' dd/mm/yyyy') as shiftdate,

TO_DATE (October 25, 2014 07:30 ',' mm/dd/yyyy hh24 ') as shiftstarttime,

TO_DATE (October 25, 2014 15:30 ',' mm/dd/yyyy hh24 ') as the double shiftendtime

)

table Details update

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

EmpID payrolldate shiftfrom translated Maj

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

1 21/10/2014 20/10/2014 23:30 21/10/2014 First 07:30

1 25/10/2014 25/10/2014 07:30 25/10/2014 15:30 second

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

There are three shifts around the clock.

23:30 - 07:30 is the first post.

07:30 - 15:30 is the second shift.

15:30 - 23:30 is the third shift.

In the leaveavailing table.

the employee's leave on 21/10/2014-10 25, 2014.

the fromdatetype indicates if the day where begins the leave leave throughout the day.

0 indicates the full day

1 indicates half (firsthalf) leave

and 2 indicates half a day (secondhalf).

Similarly, the day the leave ends can be one of these categories.

Thus, in the table above, it indicates that leave is 5 full days continuous

based on the shiftdetails I get leave 21/10/2014-10 25, 2014 as

20/10/2014 23:30 to 15:30 25/10/2014.

That is, if the fromdatetype is 0 then fromdate will be stored in shiftdetails corresponding shiftfrom

If this day is 0 so far will be translated corresponding stored in the shiftdetails table

Help, please

I use oracle 10g

This gets the expected results of the sample data:

SELECT f.shiftstarttime

t.shiftendtime

OF leaveavail l

JOIN shiftdetails f ON f.shiftdate = l.leavefromdate

JOIN shiftdetails t ON t.shiftdate = l.leavetodate

;

You don't want to test any cases where leaveavail.fromdatetype or todatetype <> 0?

Tags: Database

Similar Questions

  • Forcing USB Flash Drives to use the specific drive letter

    Here, at my work, we have a problem with USB Flash Drives. Whenever someone brings their own, will not be assigned to any drive letter available that is given as a shortcut (B, F, G). Is there anyway to tell XP to assign the USB Flash always drive to say F:?

    Scarlath

    Search and read about the software USBDLM.

  • I want to clone my original equipment existing 500 GB HARD drive to a new 1 TB HARD drive replacement. How?

    G ' Day,.

    I'm getting too big for my old 500 GB HARD drive, so I bought a new 1 TB HARD drive.

    Now I have all of the rescue disks that I made when I first got my laptop Compaq Presario CQ57-105TU . I could use them & fresh install all software & original OS, but then I have to start from scratch and re-install all the software I have installed, in addition to redo all adjustments & changes I made to the Windows 7 operating system since the first day - a year ago.

    Not really how I want to spend the next week or two around.

    I would like to clone the orig 500 GB HDD & all of its content to a new 1 TB of HARD drive.

    Sounds like where I want to go, but for 1 small question. I heard that if I just I'll have about 500 GB of space available new but I was also told that I will not be able to create new partitions of disk on the new HARD drive because of any existing partitions on the original HARD disk are created.

    1. is this true?

    2. in the case, where can I find a failsafe procedure to accomplish the clone, & then create 2 new partitions to cover the free space on the new drive.

    3. If so, is there a work around? If there is what is the procedure (plse give me cramps of brain with the jargon of techno... tnx)

    Some additional information that might be important.

    At the present time, my HARD drive has this configuration:

    Now that (Q) Local drive is diferent.  It shows 0 bytes available & 0 bytes used, & I don't have access to it.

    Computer of my wife... another laptop CQ62 model... also has the same drive,

    but hers is labeled as Microsoft Office 2010 Starter... as 0 bytes available & used - also no access, & as below, not showing is not in Dmgt.

    This drive does not appear in my Configuration of MANAGEMENT OF RECORDS : http://i.imgur.com/r4LPrDa.jpg

    Thanks for your time & consideration... Bobby

    Him early bird gets the worm, but the second mouse gets the cheese

    OK...'s done it!

    I used my CLONING HDD DOCKING STATION friends exactly like this, but he bought from a different seller 2 years ago.

    All I did was take my 500 GB drive original & placed in A slot (the front slot - Master) & I placed the new Toshiba 1 TB disk in slot B (the second slot behind Slot A... Middle - Slave). I turned the power on the box. I waited until readers spun & were ready, & I don't have a press the red button on the box...

    25% light started to blink & cloning began...

    About 40 minutes later 50% light began to Flash & the 25% brightness has remained stable.

    This means that 25%of the process has been done, & he went to 50%. .

    This sequence was continued until finally all the lights were on fixed (25% to 100%) which means that the clone was complete.

    I think it took about 2 hours and 15 minutes to clone completely.

    I closed the box power off. Then, I removed the two discs.

    I installed the new drive in the laptop carefully, & reinserted the battery, & I plugged power/charger/adapter sector of the laptop.

    Then, I ran into my fingers & press work / laptop computer shutdown.

    A few seconds my laptop has been as always to initialize.  I just had to check to make sure that I have installed the new drive... & Yes the one on the desk was the original, no doubt which means that my laptop startup disk was indeed the new drive I cloned just to.

    My laptop is started without fault!  without a hitch. Just as he always had.

    I used my computer management Administrative tool - disk management & made a simple volume for the 450 + GB of free space, affecting the next letter available player - in my car (F) case & I named it so.

    Everything worked perfectly, I can read & write on the new partition/volume. As I mentioned previously, I probably won't be able to start from scratch, but my drive (C), but it's fine for me.

    So, what have I learned?

    Well, first of all, my Compaq Presario CQ57-105TU can go to 1 TB of HARD drive without modification.

    Using the cloning method, I did no doubt saved full at least 1 weeks of resettlement work if I selected the new installation method using backup/rescue disks when the computer was first, I created started way back when.

    Outside the 2 + hours time, it took to clone the drive, 15 +/-minutes initially to remove & reinstall the drive, & the time it took to assign the new free space a drive letter (every 5-10 minutes) the procedure was clearly simple cut, I know could have been done differently, but not as simply as the method I chose.

    Pepe, thank you much for the time you spent researching my issues & responding to my message.

    I'm so glad all your fears & roadblocks have been made not, & in the end, it was possible to accomplish the task against our initial concerns - count in a very loose way with the greatest ease.

    Here are some pictures of the Station of Clone (the box) exactly like the one I used:

    Congratulations to all,

    Bobby, alias DreamRyderX

  • WD external hard drive connects to the desktop PC

    I have a WD external drive used to be connected to an XP PC.  I've upgraded to a new Win7 PC and tried to connect the external hard drive via a USB to work.  The drive does not appear on the desktop but is listed in the Device Manager.  When I connect the same drive on my W7 laptop it shows fine.  Why can I not see this external hard drive on my desktop PC?

    Check if the drive is visible in disk management you will just be assigned a drive letter, do a right click on it, assign the path and the drive letter, choose a letter available.

    How to use Vista disk management
    http://www.windowsreference.com/Windows-Vista/how-to-use-disk-management-in-Vista/

    Or in the Manager of devices under USB controllers, right-click on the car restarted, uninstalling, it must be reinstalled.

  • Temp jump drive/Flash drive strange - I've been using the player for more than a year - it is always 'J' - now, it's 'K' - I do not understand?

    USB key looks like 'K' - for more than a year he has functioned normally as 'J' like all the others - that means?

    Hello

    ·          The flash player works fine?

    ·          At connect any hardware device to the computer recently?

    The drive letters are usually dynamic. The drive letter available next is assigned once the device is connected.

  • How to release the old drive letters for the readers changed or deleted hard/dvd.

    I flashed the bios for my dvd player, now windows is assigning it a new drive letter. How the old drive letter available to be reassigned?
    Thanks for any help.

    Windows Vista 32-bit & 64-bit SP2

    Hello

    Start - type in the search box-> disk CONTROL the top management - right Click-RUN AS ADMIN

    Right-click on a drive

    Change, add, or remove a drive letter
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-add-or-remove-a-drive-letter

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • Slowwwwwww oh HELP, please, HELP (MAC)

    I downloaded PSCC 2015, and that's when my problems began.  2015 wouldn't start, crashed it, when he did start it ran so slow, that it wasn't worth it.

    I contacted Adobe and they helped me download my old versions: regular and 2014 CC (I'm on a mac). I downloaded both, and both are now slow.

    BUT before I downloaded the 2015 all was fine.

    Someone please help.  I'm working on a project and files are a little big and each thing I do send small spinning ball and I'm going crazy!

    When I change the size of the image to be smaller, it takes forever to "prepare the preview! It is something he has never done before.  l have a ton of memory and here's my setup.

    Integrated: YesScreen Shot 2016-08-07 at 8.23.05 PM.png

    NVI

    Integrated: Yes

    Well, I spent three hours on the phone with Adobe trying almost everything. Everything is suggested here and on other discussions.  Nothing has worked. So I called Apple and lucky.  I had a SMART. We tried all kinds of things, then we looked towards the activity monitor and the disc was strangled by Photoshop. Then, we watched "about this Mac", then "storage."  My huge hard drive had 'only' 30 concerts available.  Apple guy said, "It's a little too tight."  He said: 'try to get rid of some files. Let about 100 GB available. "I got rid of enough to let available 300 concerts. Photoshop is now working like a dream. The problem seems to be with the amount of disk space available to you. I have 24 GB of memory, but apparently the app uses a LOT of disk space start. And 30 concerts was not enough.

  • delete a block - my computer won't let me use google chrome as a browser. It indicates that the internet connection is not available.

    When you use the internet, my virus detector asked if I would allow google chrome to download a newer version. I clicked on the decline, and then my internet has stopped working. I finally got back on, but now my computer won't let me use google chrome as a browser. It indicates that the internet connection is not available. I was able to use other browsers, but not Google. I tried disabling my firewall to see if it would work then, but it still doesn't work. Any suggestions? I'm afraid, that I blocked it somehow. Thank you!!

    Hello

    I suggest you post your question in the Google Chrome forums here: http://www.google.com/support/forum

    This looks like a problem with this specific program and not with Windows. I hope this helps!

  • I bought for the CS6 design standard last year and had to disable and uninstall due to factory reset on computer, now when I open my products purchased to redownload my product, it won't let me? It is grayed out and thre no other links are available

    I bought the standard CS6 design last year and had to disable and uninstall due to factory reset on computer, now when I open my products purchased at re download my product, it won't let me? It is grayed out and there is no other link available for download?

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a link to access a page to download the Adobe programs if you do not have a disk or drive

    -Cloud desktop http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    -Cloud Getting Started https://helpx.adobe.com/creative-cloud.html

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

  • Adobe illustrator app does not download on my ipad air 2 more. Operating system is uptodate. Will not let me delete. Help available?

    Adobe illustrator app does not download on my ipad air 2 more. Operating system is uptodate. Will not let me delete. Help available?

    Hi Trimmertop,

    Have you tried to reboot your iPhone and then retry installing? If you have and which did not work, have you tried a forced restart of the phone?

    Sue.

  • I have first items 13, recently installed on a new laptop of Dell Inspiron 17 5000 Series. The program works very well. However, when I have access to the program, I get a message that there is an update available, 13.1. I let you go ahead and do the upda

    I have first items 13, recently installed on a new laptop of Dell Inspiron 17 5000 Series. The program works very well. However, when I have access to the program, I get a message that there is an update available, 13.1. I let him go ahead and do the update before using the program. It only updated, then restarts first elements 13. As soon as the program loads, I again get the message that 13.1 update is available. How to stop the happy ground?

    RTA,

    Thank you very much for your answers. As you suggest, I went to the help/updates and found that 3 points were scored update, Manager, 13 Photoshop and first elements 13 elements. On a hunch, instead uncheck one of them, I thought I'd see what would happen to let update all 3. It took a while, but, long story short, stopped the happy Vangogh and everything seems fine. Thank you for your messages, much appreciated.    Walt Maken

  • iCloud storage problems. won't let me put more files, even though it says I have 180 GB of available

    Help!

    Try to clean the files from my external hard drive and the Mac and put on iCloud in order to free up space. But, iCloud repeat that it cannot transfer files because there is not enough space. But when I check the info it says I still have over 180 GB of storage space... I want to only 130GB of transfer in iCloud. Why won't it let me?

    anyone else has this problem or has fixed this or give me any advice for me. can not finish my projects for work until I have free space. Super frustrating!

    A = soon)

    Not sure if you're aware but iCloud is mainly designed for the synchronization of data between devices and not as a cloud storage location only. If you have iCloud drive turned on in your Mac and you then attempt to move 130GB of an external hard drive to iCloud, it will automatically also an attempt of placement than 130 GB as a local copy on your Mac (use the menu go to Finder > iCloud drive to access the local copy).

  • PS don't let me win because 'drive not available '.

    This is the second time that this has happened.  Customer support had me to delete a file in the library, but I don't remember which file.  Can someone help me?

    OK, I had to go to go to the folder ~ / Library, preferences, then replace 'Adobe Photoshop CC 2014 "by 'Adobe Photoshop CC 2014 Old parameters' settings '.

    That fixed it.

    P.S. Not scratch disk is full - it says disc not available

  • It won't let me download a movie, even if I have 40.8 GB of available storage iCloud. What should I do?

    Can someone tell me how to download a movie when he tells you that you don't have enough storage even if I Go 40.8 left?

    You download the movie on your iPad. Do you have enough free storage on the iPad?

  • Won't let me download anything not "enough disk space" when I have over 200 GB of available

    All of a sudden my late 2011 macbook pro does not allow me to download anything on the internet. It is said there is not enough free disk space to however I have over 200 GB of free. When I look at the internal drive and the drive macbook hard disk, it indicates that the hard disk is completely full when I run disk utility, but the only thing that I should have on my Mac hard drive that has plenty of space. Nothing seems to work. I tried to repair/correction of disk utility and it does not say there is a problem, but obviously something is not seriously. Help, please!

    If you try to add a large amount of data at once, and you receive an alert about the lack of space, then in the menu bar, select

     ▹ System Preferences... ▹ Time Machine

    If there is a padlock icon in the lower left corner of the preferences window, click on it to unlock the settings and to authenticate. Turn off the Machine time and then back on. Close the window.

    Restart the computer. Test.

Maybe you are looking for

  • How do I export Notes to my iPod Touch?

    I looked at this question, and the most recent response is dated "2011". Please help me as far as possible. I want to be able to transfer/copy my notes from my iPod Touch to my MacbookPro, but if someone can tell me how to transfer to my computer Win

  • Photocurrent at V = 0

    Dear comrades, I ve got a question, I ve had a problem that s killing me softly and I need your help if it would be possible. The question is to know how to program a Keithley 2400 to obtain the photocurrent to 0 volt. IE: I have to indicate a V = 0

  • Broadcast group

    I can't get the addresses that I have grouped in a Contacts folder to appear in my to: box to send the same email to several people. I use Windows Mail on Vista. Margin MJGlaser

  • Network - E3000 drive

    I recently installed a new router, E3000, and I cannot map attached thumb drive.  I can connect through the router to the internet very well and I had used Cisco connect to access the storage menu to create the share.  Then, when I try to map the dri

  • greeting card free maker for windows 7?

    Need help: Y at - it a manufacturer of free greeting card for windows 7 (image, it has Windows xp)? Waiting for response from anyone... Thank you and have a nice day.