Can I ADD using a TIMESTAMP ???

here is an example and wondering if this is possible
Selct EMP_NUM,
SUM("DSS_SNOW_PROGRAM"."TIME_OUT" - "DSS_SNOW_PROGRAM"."TIME_IN") as "HOURS_WORKED"
FROM DRIVERS_LOG
WHERE EMP_NUM='2'
AND TO_DATE(TO_CHAR("DSS_SNOW_PROGRAM"."TIME_IN", 'DD-MON-YY')) BETWEEN '01-DEC-10' AND '07-DEC-10'
Is it possible to add up the total hours emp 2 worked from 01-dec-10 to 07-dec-10??
how can i achieve the correct syntax???
Thanks for the help and assistance.

NOT TESTED! something to play with (datatype date used instead of timestamp to keep lines shorter ;) )
with drivers_log as
(select 1 emp_num,to_date('01-DEC-10 8:30:40','dd-MON-rr hh24:mi:ss') time_in,to_date('01-DEC-10 16:33:44','dd-MON-rr hh24:mi:ss') time_out from dual union all
select 1,to_date('02-DEC-10 8:25:11','dd-MON-rr hh24:mi:ss'),to_date('02-DEC-10 16:32:55','dd-MON-rr hh24:mi:ss') from dual union all
select 1,to_date('03-DEC-10 8:15:22','dd-MON-rr hh24:mi:ss'),to_date('03-DEC-10 16:30:44','dd-MON-rr hh24:mi:ss') from dual union all
select 1,to_date('04-DEC-10 8:35:07','dd-MON-rr hh24:mi:ss'),to_date('04-DEC-10 16:28:12','dd-MON-rr hh24:mi:ss') from dual union all
select 1,to_date('05-DEC-10 8:29:47','dd-MON-rr hh24:mi:ss'),to_date('05-DEC-10 16:48:52','dd-MON-rr hh24:mi:ss') from dual union all
select 2,to_date('06-DEC-10 8:01:02','dd-MON-rr hh24:mi:ss'),to_date('06-DEC-10 16:58:42','dd-MON-rr hh24:mi:ss') from dual union all
select 1,to_date('07-DEC-10 8:21:33','dd-MON-rr hh24:mi:ss'),to_date('07-DEC-10 16:31:46','dd-MON-rr hh24:mi:ss') from dual union all
select 2,to_date('07-DEC-10 8:22:57','dd-MON-rr hh24:mi:ss'),to_date('07-DEC-10 16:32:55','dd-MON-rr hh24:mi:ss') from dual
select emp_num,trunc(24 * sum(time_out - time_in)) hours_worked
  from drivers_log
where time_in between to_date('01-DEC-10','dd-MON-rr') and to_date('08-DEC-10','dd-MON-rr')
group by emp_numRegards
Etbin

Similar Messages

  • Can't Add using more printers

    Hi, since I'm upgraded, I'm experiencing a wierd phenomenon... maybe someone can suggest a work around. I'd like to add a canon image runner through Canon IP. I go to add printers... click more printers. Select the canon protocol... enter the IP address... there are two buttons, one is cancel, one is add... Add is blue. As many times as I hit the add button, nothing happens. Any ideas? Thanks!

    > I've got a site which is built entirely with AP Divs (in
    CS3). Messy, but
    > quick and easy.
    You pay a serious price for the "quick and easy" part, buy
    you may not be
    aware of it yet.
    > I've got to the stage now though, where I can't add any
    more. I can draw
    > the
    > shape using the Draw AP Div tool, but as soon as I let
    go of the mouse
    > button,
    > the box disappears (it doesn't get as far as becoming a
    blue box).
    There is no limit on the number of AP elements a page can
    have.
    > One thing I have noticed is that if I use design view to
    delete an AP
    > element,
    > it doesn't seem to get removed from the code.
    This would mean that you aren't really removing the element
    from either
    Design or Code view. If the code is there, the element is
    there. If the
    code is not there, the element is not there.
    > Anyone got any ideas?
    It would be hard to diagnose what might be happening without
    seeing your
    page and its code. Can you post a link?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "aliprior" <[email protected]> wrote in
    message
    news:ge1mjo$i4p$[email protected]..
    > Hi,
    >
    > I've got a site which is built entirely with AP Divs (in
    CS3). Messy, but
    > quick and easy.
    >
    > I've got to the stage now though, where I can't add any
    more. I can draw
    > the
    > shape using the Draw AP Div tool, but as soon as I let
    go of the mouse
    > button,
    > the box disappears (it doesn't get as far as becoming a
    blue box).
    >
    > I've checked that it's not hidden beneath another layer.
    >
    > One thing I have noticed is that if I use design view to
    delete an AP
    > element,
    > it doesn't seem to get removed from the code.
    >
    > Anyone got any ideas?
    >
    > Thanks,
    >
    > A
    >

  • HT201342 How can I add an e-mail address to my existing icloud addresses?  I currently only use one and I would like to ad two more?

    How can I add an e-mail address to my existing icloud account?  I curently only use one of the three.

    Each iCloud account only has a single iCloud account.  If you want, you can add up to 3 alias addresses that will receive email in the same iCloud inbox, as explained here: http://support.apple.com/kb/PH2622.

  • How can I add more than one submit button in a jsp without use of javascrip

    I want to add more than one submit button in a jsp without use of javascript

    you can do add multiple submit button with this way
    <input type="submit" value="Previous" />
    <input type="submit" value="Next" />
    <input type="submit" value="Finish" />

  • How can i add my outlook email to my ipad without useing the Exchange Service?

    Please help me in this, How can i add my outlook email to my ipad without useing the Exchange Service?

    I'm afraid you've posted in the wrong place. This is a technical forum around a particular product called 'SharePoint'. This does talk to Exchange and Outlook in places but we don't specialised in either of those. You should have a look for one of the
    generic Outlook support forums or contact your IT department if it's a work related account.

  • I got the new iPhone 5C. In my cellular settings, under "Use cellular data for", it only show passbook and facetime. How can I add other apps? Also, my carrier is AT&T

    I got the new iPhone 5C. In my cellular settings, under "Use cellular data for", it only show passbook and facetime. How can I add other apps? Also, my carrier is AT&amp;T

    Hello Sophie59
    You should be able to see two different tabs when setting up the email if you go to Other > Add Mail Account. Once you enter in the email address and password, you should be at the next screen to provide more details about the email as far as incoming and outgoing servers and at the top there will be a blue section to add it in as a POP or IMAP email account. Check out the article below for further troubleshooting and emails setup options.
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    iOS: Adding an email account
    http://support.apple.com/kb/ht4810
    Regards,
    -Norm G.

  • Can't add music my iPhone from iTunes.  When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.  [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to

    Can't add music my iPhone from iTunes.
    When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
    [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
    Also, just updated the phone's software today, and iTunes' software is already up to date.

    Hi Gregg,
    Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
    Cheers,
    GB

  • Can't add Shared Member using API

    I would like to create a lot of shared members.Using API I do it as following according to documentation: ESS_MBRINFO_T MbrInfo; memset(&MbrInfo, '\0', sizeof(MbrInfo)); strcpy(MbrInfo.szMember, (char*)mbrName); MbrInfo.usShare = ESS_SHARE_SHARE; sts = EssOtlAddMember(getOutline(), &MbrInfo, ESS_NULL, hMbr, &hNewMember); When I try to add shared member, then sts = 1060051.So I have to change names and after correct them manually.Using HAB API I can't add shared member too.Regards,Georgy

    Hi and Welcome to the Forums!
    To really help, you should come and create an account on these forums...there are many unanswered questions from your initial inquiry...come here, create an account, and open a thread so that it all can be resolved:
    http://supportforums.blackberry.com/rim/
    Cheers!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Konqueror browser for Linux has an useful CPU limitation feature for websites using Flash content. Can you add such a feature in Firefox?

    I have recently found that Konqueror browser for Linux can help user to limit cpu usage while visiting a website using flash technology by changing settings in the Flash section and adjusting the slider from VERY HIGH settings to HIGH and MEDIUM and so on. It actually works, and it does not have a direct impact on the general performance for flash player but it may generate some conflicts if other extensions such as add-blocker or click-to-flash are enabled also.
    Maybe you can add a similar setting in Firefox in the browser option section or just as an useful addon or extension.

    Sorry for being late with my reply. I've just tested that addon that you mentioned in your post ( https://addons.mozilla.org/en-US/fire.../system-monitor/ ) , it looks like a system monitor and nothing more than that.
    As for the memory tip ( about:memory ) I agree that it can be extremely useful for users that have less than 1 gb memory installed on their system. I know very little about computers but I can tell your tip for optimizing memory usage in firefox has merits.
    Me, I have another problem with cpu overload in Firefox, Internet Explorer, Opera and most of the browsers with flash support enabled. Each and every time time I visit a page that features all sort of adds and gadgets based on flash technology, and each time I try to watch a video online my cpu goes all the way up to 100% and stays there until i finally decide to close the browser.
    I am running winxp and also linux on a Dell Optiplex GX260 machine with 2000 MHz cpu, 1024 Mib ram and 128 Mib video card, it is not the best computer in the world but still 2000 MHz should be enough for a limited and uneventful web experience.
    It is not as much an issue with the web browser, any browser, the whole problem is caused by funny people claiming to be deeply involved with web development, and promoting flash technology for ages instead of choosing other alternatives, more user friendly. All I am saying is that flash ruined the entire web experience making people to believe that they actually need dual-core cpu and coreduo and deepfreeze cpu and so on which is only partially true.
    I always get better results for cpu usage when watching online videos that use media player as default player and not flash player, and my cpu stays below 70% usage which is not much but still it is not 100% usage.
    Konqueror offered me a nice surprise, and I was able to limit cpu usage once I moved that slider from Very High setttings for flash player to Medium settings. I got something between 80-90% cpu usage as a result, and I was very pleased to finally see a working solution to my problem at least for linux if not for windows.
    The only other browser that I can use for windows only, which handles both flash player and cpu usage well is Kmeleon browser which is a long forgotten project but does offer nice features once you find some plugins that it needs to make it come to life again.

  • How can you add a where clause using "OR" with applied ViewCriteria?

    [JDeveloper 10.1.3 SU4]
    [JHeadstart 10.1.3 build 78]
    I am using JHeadstart, but have a question probably more in the ADF area. On the JHeadstart forum I asked:
    "I am overriding JhsApplicationModule's advancedSearch in order to be able to search in childtables. I created transient attributes, display those in advanced search and in the overridden method I check if any of these are filled by the user and create a where clause like 'EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>)'. I add this whereclause using ViewObject.setWhereClause.
    So far so good and it works. However, if the user selects 'Result matches any criteria', combining setWhereClause and the normal advancedSearch QueryByExample implementation using ViewCriteriaRow do not provide the desired result, since the ViewCriteria and the setWhereClause are AND-ed together, which is fine if the user selects the (default) "Results match all criteria" (everything is AND-ed) but not the "Result matches any criteria", since then every criterium is OR-ed together, except for the setwhereclause criteria and the set of ViewCriteriaRows, they are AND-ed.
    I looked if I could specify that a WhereClause will be OR-ed to existing applied ViewCriteria, but no luck. Do I have to rewrite also advancedSearch's ViewCriteria implementation and write an entire setWhereClause implementation to be able to "OR" every criterium? Or any other suggestions? Can I look at the entire Where clause and rewrite it (after applyCriteria and setWhereClause are called on the VO)?
    Toine"
    Sandra Muller (JHeadstart Team) told me today: "This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. The question is: how can you add a where clause using "OR" if there are already one or more ViewCriteria applied?
    To simplify the test case, you could create a simple ADF BC test client class in a test Model project without JHeadstart (in the test class, use bc4jclient + Ctrl-Enter), in which you first apply a few ViewCriteriaRows to a View Object and also add a where clause.
    Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ? (This what I am doing now ;-))
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting"
    Anyone knowing the answer or am I asking for an enhancement?
    Toine

    Hi,
    Can you SET your whereclause as follows ?
    ('Y' = <isAnd>
    and EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>))
    OR ('N' = <isAnd>
    AND EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> OR <another column in childtable> LIKE '<value supplied by user>))
    )

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • Have MacBook Pro (ancient) has 2.16 Ghz Intel Core Duo with 1 GB 667 MHz RAM using OS 10.4.11. Can I upgrade OS? If so, how far? And can I add more memory? I realize this is an old laptop but I need to wait to upgrade to new.

    Have MacBook Pro (ancient) has
    2.16 Ghz Intel Core Duo with
    1 GB 667 MHz RAM
    using OS 10.4.11.
    Can I upgrade OS? If so, how far?
    And can I add more memory?
    I realize this is an old laptop but I need to wait to upgrade to new.

    if it is the core duo, mac OS X 10.6.8., max ram 2gb.

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.

    I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.  When I try to move a PDF file to iBooks the system works for a while...sometimes the file appears and than disappears....sometimes the file never appears. Is ther some limit to the number of books or total storage used in IBooks?  Thanks....

    Hi jybravo70, 
    Welcome to the Apple Support Communities!
    It sounds like you may be experiencing issues on your non iOS 8 devices because iOS 8 is required to set up or join a Family Sharing group.
    The following information is located in the print at the bottom of the article. 
    Apple - iCloud - Family Sharing
    Family Sharing requires a personal Apple ID signed in to iCloud and iTunes. Music, movies, TV shows, and books can be downloaded on up to 10 devices per account, five of which can be computers. iOS 8 and OS X Yosemite are required to set up or join a Family Sharing group and are recommended for full functionality. Not all content is eligible for Family Sharing.
    Have a great day, 
    Joe

  • Itunes and all my movies have disappeared,i can no longer add to library from my external hdd which ive always used and can only add from the laptops own hard drive,any ideas what the issue could be?

    ive recently updated, itunes and all my movies have disappeared,i can no longer add to library from my external hdd which ive always used and can only add from the laptops own hard drive,any ideas what the issue could be?if i transfer the movies from the external to the laptop they will add to the library without any problem so theres no issue with the laptop but when i go to add file in itunes i can path to the external but as soon as i select the file nothing happens, just goes back to itunes

    This happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

Maybe you are looking for

  • Using i-prefix in an app name

    Hello, 1- Can I use i-Prefix in an app name like in iGame or iSaw? 2- Is it allowed to put an unknown coach's name in the app "Mr. John's Tips"?

  • Pl help in query

    I have a table arm. In that loan_number,change_begin_date and change_end_date are composite primary key.so i want only one data for loan_number as per this condition change_begin_date <= trunc(sysdate, 'mm')-1 and change_end_date >= trunc(sysdate, 'm

  • ITunes Library Does Not See Music in iTunes Music Folder

    I'm sure this has been posted before, but I can't seem to search the right combination of terms to find the answer. The issue: I just bought a Macbook Pro, an upgrade from my Powermac G5. On the old setup, iTunes was accessing its library from a seco

  • Issues Missing files & duplicate files and not enough screen space

    Hello everyone, I'm using a 1.67 Ghz 15 in tibook with 1 gig of ram I had issue yesterday, missing files, I was in the rating/keywords panel scrolling through my images, one was a bit soft so I deleted it using the command delete combo. Somehow all o

  • LACP with Weighted Load Balancing

    Hi, I am trying to figure out how to use weighted load balancing (WLB) with LACP in Nexus 5K. Please can you give any duidance on this because the documentation I found so far is not helpful. Basically I have a port channel cosisting of two physical