Refining a query to only show entries for the current week

Hello.
Does anyone know how to modify a query to only show records that have dates in the current week? Records have a start date and a finish date so the query should recognise that an entry may be valid for more than one week?
Kind Regards,
swelch

Assuming week ends on a saturday and dates aren't NULL - change as appropriate - this is one way
All rows....
SELECT TO_CHAR (begin_date, 'DD-Mon-YYYY HH24:MI:SS') AS begin_date
, TO_CHAR (end_date, 'DD-Mon-YYYY HH24:MI:SS') AS end_date
FROM mydates
ORDER BY begin_date;
BEGIN_DATE,END_DATE
05-Jul-2011 06:49:25,15-Jul-2011 06:49:25
05-Jun-2011 06:48:57,15-Jun-2011 06:48:57
15-Jun-2011 06:48:29,25-Jun-2011 06:48:29
25-Jun-2011 06:47:57,05-Jul-2011 06:47:57
Current week rows....
SELECT TO_CHAR (begin_date, 'DD-Mon-YYYY HH24:MI:SS') AS begin_date,
TO_CHAR (end_date, 'DD-Mon-YYYY HH24:MI:SS') AS end_date
FROM mydates
WHERE TRUNC (begin_date) < NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') + 1
AND TRUNC (end_date) > NEXT_DAY (TRUNC (SYSDATE) - 1, 'Sat') - 7
ORDER BY begin_date
BEGIN_DATE,END_DATE
15-Jun-2011 06:48:29,25-Jun-2011 06:48:29
25-Jun-2011 06:47:57,05-Jul-2011 06:47:57
Edited by: Robert Chalton on 25-Jun-2011 07:01

Similar Messages

  • Calendar only showing entries for two months in the past on my iphone.

    Calendar only showing entries for last two months on my iphone. How do I get full history of calendar?

    Brian,
    Go to Settings>Mail, Contacts, Calendars>Calendars>Sync>"All Events"

  • [kde] "Only show tasks from the current desktop" doesn't work for max

    Hi,
    I have two monitor setup (laptop + main monitor) and I would love to use "Only show tasks from the current desktop" option in KDE Task Manager but for some strange reason it doesn't work for me. Well, it works but only partially - for restored/unmaximized windows. When I maximize one it appears on the Taskbar on both screens. Is this normal? May it be due to the fact that I've placed Taskbar on top of the screens?

    Did you miss this bit
    "Graphics : 1 GB NVIDIA Quadro 600 (1DP & 1DVI-I) (1DP-DVI & 1DVI-VGA adapter) (ELGA13) 1"
    And the final image clearly states the type of Graphics Card he has
    Photoshop CS6 GPU FAQ
    Tested video cards for Photoshop CS6
    Adobe tested the following video cards before the release of Photoshop CS6. This document lists the video card by series. The minimum amount of RAM supported on video cards for Photoshop CS6 is 256 MB. Photoshop 13.1 cannot display 3D features if you have less than 512 MB of VRAM on your video card.
    Important: This document is updated as newly released cards are tested. However, Adobe cannot test all cards in a timely manner. If a video card is not listed here, but was released after May 2012, you can assume that the card will work with Photoshop CS6.
    Adobe tested laptop and desktop versions of the following cards. Be sure to download the latest driver for your specific model. (Laptop and desktop versions have slightly different names.)
    nVidia GeForce 8000, 9000, 100, 200, 300, 400, 500, 600 series
    nVidia Quadro 400, 600, 2000, 4000 (Mac & Win), CX, 5000, 6000, K600, K2000, K4000, K5000 (Windows & Mac OS)

  • Back button doesn't work due to multiple history entries for the current page. How can I fix this problem?

    This problem started February 2015. I have noticed it mostly while searching ebay. When I hit the back button it did not work. I right clicked the back button and found at least 2 and sometimes up to a dozen duplicate history entries for the current page I am on, meaning I would have to click the back button a dozen times to get to the previous page. I am using Firefox 35.0.1 on a Vista computer. I have not found any fix for the problem after searching the internet for hours. I have seen similar issues with people using IE and some say the duplicate entries are caused by banner ads but still no one has provided a good answer or fix for the problem. Please help.

    I will leave further answers to users of ebay. Script or adblockers may ease the problem.
    * Try this add-on search [https://addons.mozilla.org/en-US/firefox/search/?q=blocker&platform=windows&appver=35.0&sort=users blocker] (Windows)

  • Should OKP1 being all closed and only be opened for the current period ?

    Guyz,
    In OB52 (Financial closing period) , only "open period" being input on it. So, basically the closing period in OB52 is by opening the period provided to be posting.
    Then how about OKP1?
    It's provided to lock the actual period , actual transactions, or to lock the plan period or plan transactions..but the question is:
    a. Should it be all closed (ticked mark all transactions & all periods) except for the current period that is provided to be posting as period determined in OB52...For example, it is now June, then all periods & transactions other than June is being ticked mark.
    OR
    b. Should it be all opened except for the period that is being closed? For example, it is now June, so periods & transactions of period January to May are being ticked mark (closed).
    Which of the options is the best practice?
    Need your answers asap plz.... Thanking you ..

    Hello,
    For example in OB52, if you have opened for June, i.e.,
    06 of 2009 to 06 of 2009 (1st Period)
    In such case,
    In OKP1, you need to only untick June for all the months and close all remaining months (Untick June and tick all other months and transactions).
    Note that your planning activities for all the year must have been completed. Otherwise, you cannot enter the plan values.
    Regards,
    Ravi

  • I cannot open my banking page or open PDF's from any mozilla browser. All of my applications work fine in Internet Explorer. This has only started happening for the last week or so.

    Whenever I try to access my banking information on firefox it only downloads a small portion of the display page. Also, when I try to open a PDF nothing happens when using firefox. I have the latest version of Adobe.

    Hi Chris,
    Well, I tried to delete the Caches and I threw all the .plist files related to microsoft in the trash -- athough I don't know if this is the way to delete files but I haven't found another yet....
    From your other suggestions, it seems to me that you have the impression that I want to stop using Microsoft Office (it was 2007, I made a mistake) though... but this is not the case.
    So... tell me if I misunderstood correctly or if I did anything wrong, or if you have anything else to suggest...
    Thanks a lot anyways!
    Stephanie

  • I need to install Firefox 4 for browser compatibility testing, but I can only find installers for the current version and 3.6.19; where can I find what I'm looking for?

    I am trying to do some browser compatibility testing using Firefox, but I can't find any installers for it here. The closest I can find are installers for 3.6.19 at http://www.mozilla.com/en-US/firefox/all-older.html. Where can I find an official installer for Firefox 4?

    Solved my own problem - I can download the installer by navigating directly to http://download.mozilla.og/?product=firefox-4.0.1&os=win&lang=en-US.

  • Returning Records Only for the Current Month

    Hello,
    I have a query that returns records for the current week and I would like to extend it to return records for the current month.
    where TRUNC (START_DATE) < NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, 'Sat') + 1
    AND TRUNC (END_DATE) > NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, 'Sat') - 7
    I have two date fields, the first is called 'Start_Date', the second is called 'End_Date'. I would like the query to return all records for the current month including those that may begin prior to or finish post the month as events can begin in one month and end in another. Does anyone know how this is done in a 'Where Clause'?
    Kind Regards,
    Steve Welch

    Actually LAST_DAY(ADD_MONTHS(TRUNC(sysdate),-1))+1 gives you the starting day of the current month, and LAST_DAY(TRUNC(sysdate)) gives you the last day of the current month.
    So the where be
    WHERE TRUNC(START_DATE) >= LAST_DAY(ADD_MONTHS(TRUNC(sysdate),-1))+1 OR TRUNC(END_DATE) <= LAST_DAY(TRUNC(sysdate))
    Start Date >= 1st Day of Month OR End Date <= Last Day of Month, meaning either date is within the current month.

  • When I updated by iphone with IOS7, my calendar entries did not follow the icloud.  I am only showing pre set calendar entries for the year?

    When I updated by iphone with IOS7, my calendar entries did not follow the icloud.  I am only showing pre set calendar entries for the year and lost all other calendar entrie and it will not take any new entries.  They show up in my outlook, but not on my iphone, which they did before I updated my software to the new i0s7

    Before syncing, select each calendar on your Mac and back it up by going to File>Export>Export.  If anything goes missing, you can use these to restore your calendars.
    Have you tried simply force closing the calendar app on your iPhone?  To do this, double-tap the home button, locate the calendar app, then swipe up on the image above the app icloud to close it and tap the home bottom.  Then test your calendar again.

  • Creation of a Query to show the values for the current month and the last 12 months data.

    Dear All,
    Good day!
    I have to create a Query with the below requirement.
    I have to create a Query to show the values for the current month and the last 12 months data.
    Can you please guide me how to achieve this ??
    thank you,
    Regards,
    Hema

    Hema
    explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
    you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
    for some more hints..
    http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
    http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
    http://scn.sap.com/thread/3217381
    search on SDN you will get many other ways..
    Thanks,
    Bhupesh

  • HT201263 iphone only shows logo for 13 seconds when connected to pc thats all it does however i connected to wall socket it goes up to connect to itunes but when i unplug it then it switches off

    iphone only shows logo for 13 seconds when connected to pc thats all it does however i connected to wall socket, it goes up to connect to itunes but when i unplug it then it switches off.
    this is coincidently after an ios update for iphone which i did just approx two days earlier which was suppused to fix battery issues?
    also battery shows 100 percent full but as i explained if disconected from socket it switches off altogether.

    Hopefully and most likely faulty battery. If you have Warranty or AppleCare, make Genius reservation and take to Apple for resolution.

  • When I attempt to apply a lens profile in the Develop module the only choices are for the Fujifilm X100/S/T even though in the Library module the EXIF data correctly shows the camera as the X-T1 and the precise lens used to take the picture. How do I get

    When I attempt to apply a lens profile in the Develop module the only choices are for the Fujifilm X100/S/T even though in the Library module the EXIF data correctly shows the camera as the X-T1 and the precise lens used to take the picture. How do I get the right profile available?

    First, the required profile needs to be present. LR 5.4 supports the X-T1 in terms of understanding its Raw format, but will not come with a profile for every lens which can be mounted onto that.
    A profile is made for each specific lens, as mounted on a certain camera. It can also be used with pictures taken on a different (reasonably similar) camera body than the one originally used during profiling. This is subject to the sensor format: you can employ a given lens profile made for full frame, on an image from a crop sensor behind the same lens - but not vice versa.
    Next, the image type needs to correspond to the image type which has been built into the profile: Raw, or non-Raw.
    Lightroom offers only profiles of the right type for the image(s) concerned. There are many more provided for correcting camera Raw, than for correcting camera JPG. That is also the case with additional profiles, e.g. those accessed via the Adobe lens profile downloader utility.
    Finally, in the event that there simply is no profile out there for a given lens, it is not particularly difficult (though a little tedious) for the end user to generate one, using a further Adobe utility which is downloadable as a package, including a range of checkerboard calibration targets, each of which needs to be printed at a stated physical size.

  • HT201210 TRIED UPGRADING OLD IPHONE FROM SOFTWARE 3.0 BUT NOW ONLY SHOWING SLIDE FOR EMERGENCY.HELP

    tried upgrading iphone 16gb from software 3.0 but now only showing slide for emergency.help

    Connect in recovery mode, explained in this article: iPhone and iPod touch: Unable to restore , then choose "restore" when you right click on your device in the device list and set it up "as new device" How to set up your iPhone or iPod touch as a new device

  • Customizing Slideshows - how do I add an image in the text box that only shows up for a specific ima

    Customizing Slideshows - how do I add an image in the text box that only shows up for a specific image and not in every text box?

    Can you maybe provide a screen shot to further explain your question?
    Julia

  • When I move to the next record on a form it shows the entries for the previous record even though the record is actually null

    I have a form that logs fibre analysis for asbestos analaysis. Let's say I am analysisng 2 samples. I log all the details for the first sample and hit save. Now I use the scroll button to move to the next sample. When the screen refreshes all the entries for the first sample are still showing on the screen. But these are just phantom entries, when I look at the back-end database there are of course no entries against the second sample. This does not occur with any other browser.
    I have tried clearing the cache to no avail.
    Any ideas?

    Is Firefox filling the form via the cache or via saved form data?
    If this data still gets filled when "Remember search and form history" is disabled the Firefox fills it from the cache.
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": "Remember search and form history"
    In such a case a hard refresh via Ctrl + F5 might help to reset the form data.

Maybe you are looking for

  • Issue with updating texts in Quotations

    Hi All, I am facing a very weird issue in one of my programs. The program creates or changes a bunch of quotations based on the input data via a file through a BDC. Once it completes creating or changing the quotations it updates a particular text ob

  • JTabbedPane with JTextField

    Can anyone provide me with an example on how to incorporate a JTextField into a JTabbedPane? There are many examples of creating JButtons as components of a JTabbedPanes but nothing for JTextFields. Can this be done? I get some wierd compiler errors

  • Best computer for The Sims 3?

    I'm looking at getting a new computer to use for The Sims 3, and I rally have no idea what to look for. The laptop I've been using (Compaq Presario c700, wasn't intended for Sims when I bought it) is incredibly slow when I try playing. I need to be a

  • Oracle 10g Lite-Sync Error

    Hi, I am Using Oracle 10g"Lite" Database, I am doing manual SYNC Process. Today I started the manual Sync Process i Got this Error Message in the Screen "POL-3201 Invalid Slot Number" I referred a document Shows this information POL-3201 Invalid slot

  • Adobe Air and export to Excel from jasperserver

    Hello, I had issues to display PDF's from Adobe Air when using jasperserver. As soon as I intalled Reader 9.0 it worked fine..Now I am having an issue with excel and csv and rtf files... When I click from my air application's and generate a report an