Select Expert Record. Last 6 months and week start date on Monday

Hello,
i am trying to use the select expert record to grab the last 6 months worth of data. I require the week start day to be a monday and end on a sunday.
Can someone please provide some advice the best way to do this
kind regards
david

Hello Abhilash,
Once again thanks for your reply.
Yes this is correct, when it goes back 6 months i need it to skip the days prior and begin on a monday as we are reporting on a mon-sunday basis.
I have tried your formula Date field >= dateadd('m',-6,currentdate) and it seems to grab 6 months of data, but the group weeks are not grouping from Monday to Sunday...
kind regards
david
Edited by: davitali on Dec 2, 2011 9:35 AM

Similar Messages

  • How to get the week start date from ISO week number

    Hi,
    I have a table with the following stucture
    Year    error    Week1     week2   week3 ......week53
    2012       error1     2           4         2             1
    2012       error2    3          0        1                 1I was hoping to get something like select year, error, week1||'Week start date which is a monday of that week' , week2||'Week start date,again monday',....week53 from table
    Any suggestions please?
    Thanks,
    Sun

    Hi, Sun,
    To see when week N started, add 7 * (N - 1) days to the beginning of the year. (By definition, the beginning of the ISO year is the start of week 1 of the ISO year.)
    To see when week 22 of the current year started:
    SELECT  TRUNC (SYSDATE, 'IYYY') + (7 * (22 - 1))
    FROM    dual
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • How can i get 2nd week starting date and ending date in a month?

    please help me to query this.
    thanks in advance

    Hi,
    I assume the second week start the next monday after the 1st of the current month. End of week is the next sunday.
    If a week start monday, the second week of december start the 5th and ending the 11th :
      1  select 8-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D')+1 first_day2w,
      2         15-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D') last_day2w
      3* from dual
    SQL> /
    FIRST_DAY2W LAST_DAY2W
              5         11If we take august, the second week start the 8th to end the 14th
      1  select 8-to_char(to_date('01082005','DDMMYYYY'),'D')+1 first_day2w,
      2         15-to_char(to_date('01082005','DDMMYYYY'),'D') last_day2w
      3* from dual
    SQL> /
    FIRST_DAY2W LAST_DAY2W
              8         14HTH,
    Nicolas.
    Note that my nls_territory = FRANCE.
    if you're in America, first day of week is sunday, and last is saturday :
      1* alter session set NLS_TERRITORY='AMERICA'
    SQL> /
    Session altered.
    SQL> ed
    Wrote file afiedt.buf
      1  select 8-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D')+1 first_day2w,
      2         15-to_char(to_date('01'||to_char(sysdate,'MMYYYY'),'DDMMYYYY'),'D') last_day2w
      3* from dual
    SQL> /
    FIRST_DAY2W LAST_DAY2W
              4         10
    SQL> Message was edited by:
    N. Gasparotto

  • I got a new iPad last month and set up through iCloud. Still have a message on my screen that it is still restoring from iCloud. How do I get it to complete other than having to rest me start again?

    I Got a new iPad last month and sent up in the usually way and syncd to iCloud. However it has ever since shown a comment saying:
    Restoring from from I cloud backup
    i I have no idea how to get it to complete. Or do I need to re-set and start again?
    Help!

    Where do you see this message? I know it can take a few hours to restore from an iCloud backup if you had lots of apps, data, movies, camera roll photos etc on it, but it should not take days and daus to finish.
    Have you restarted or reset your iPad since you got it? Not the reset that you are talking about - I mean the system reset. Try either or both and see if the message goes away.
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support

  • How can I retrieve last month and last mont -1?

    Hi guys, I am finishing to build a complex SSIS package, the last task is pretty simple but I'd like you to suggest the better solution in terms of performance (table with millions rows). The task is to create two table, one with the last update (archived)
    and one with the last update -1 (the update is done monthly) taking the data from an huge table (create by the package).
    The DDL (sample):
    create table forum (runner varchar(20), race varchar(20), nmonth varchar (6), archived datetime2)
    insert into forum values ('Zabres','Poland Red Bull','201411','2015-01-26 11:37:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2015-01-26 11:38:04.6870000'),
    ('Zabres','France Red Bull','201411','2015-01-26 11:38:10.6870000'),
    ('Reynolds','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-31 16:26:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2014-12-31 16:26:14.6870000'),
    ('Zabres','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Greefer','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 10:30:14.5870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 10:31:10.5550000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 10:31:14.3560000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 9:11:14.4420000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 9:11:54.7760000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 9:11:55.7860000')
    The tough thing is the format of archived. How can I take the last month and, especially, the last month -1 without caring about the seconds and milliseconds ?
    The expected is LAST MONTH
    LAST MONTH -1
    Many thanks in advance

    Yes! Your solution looks better, even in terms of performance (242 sec mine, 202 sec yours). Now I'm wondering the same, shall I upload the elements only once per month? What if I got more upload in one month?
    You can also upload it once per week
    In which case query would be like
    SELECT *
    FROM forum
    WHERE archived >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND archived < DATEADD(wk,DATEDIFF(wk,0,GETDATE())+1,0)
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Handling Time Dimensions with Monthly and Weekly analysis

    I'm charged to build a cube that can handle both monthly and weekly analysis. They want to be view projections on a weekly grain, but looking back at history they want to be able to tie back to the general ledger at a monthly level.
    Is it overkill to load data down to the daily level in order to support multiple roll ups to the month and week? What is the best way to handle this kind of situation?

    Having the data come as two different formats (one for months, one for weeks) versus having it come in daily buckets and constructing the months/weeks within Essbase is a call I wouldn't make without understanding the needs first.
    Assuming there is no need for data at the daily level, I would weigh the selection based on performace. If the performance is not too outragious, taking the data in at a daily basis would make it easier to reconstruct later. If performance is an issue (or becomes an issue), I would still be tempted to load a daily cube at level 0, summarize the Months and Weeks, and then feed the main cube from there.
    So many ways to do this... and for every way there is a reason you might want to try something else. I'd start with the easy approach, and only go "grand" if you have to (meaning: load it daily, summarize in Essbase, and revisit the detail/summary cube split idea if the performance tanks out).

  • HT204406 Itunes Match won't upload. I get error stating there was an error in the itunes store, please try again. I have tried again everyday for the last month and am still unable to use.  Any ideas on why Match can't complete the 1st step of the process

    Itunes Match won't upload. I get error stating there was an error in the itunes store, please try again. I have tried again everyday for the last month and am still unable to use.  Any ideas on why Match can't complete the 1st step of the process (Gathering information about your Itunes library)?

    JohnCullison wrote:
    For the last few weeks, the iTunes store has been displayed with empty graphic rectangles (with a blue box containing a white question mark centered in the rectangles), bits of text, and some buttons. The page extends quite a ways, including what I assume would be all the links to all the music...
    If all you are trying to do is buy music, you can easily buy MP3s at any online music download store (e.g. amazon.com) and add them to your iTunes library.

  • Select Expert - Record

    I'm trying to limit the values presented in the Select Expert - Record tab based upon it's relationship to a selected value from another field.
    We have several hospitals.  Each hospital has several floors or unit/wards usually identified as 6 East, 2 West, 4 North, etc.  Not all of the hospitals have the same named unit/wards.
    I select use select expert - table_name.Facility_Name = "Hospital A" when I select table_name.Unit_Name I only want those units/wards from the "Hospital_A" to be displayed in the list and not all of the units/wards that are listed in the table.  This way I do not have to wade through all of the unit/wards that a facility does not have.  The report is for unit/ward.
    Thanks
    Michael

    Hi Michael,
    If you are using Crystal XI or newer version then try creating a cascading prompt to get filtered with parent level field value.
    For more information check the sample report prompting.rpt that shows the cascading prompt of Country>Region>city
    Regards,
    Raghavendra

  • New Formulas don't show under Select Expert --Record

    Hello,
           Some how my CR 2008 don't show new formulas in my report when I go in Select Expert-Record, all the formulas show under Field Explorer?? the odd part is that old formulas still showing only new ones don't show is a setup that I'm missing????

    The old formulas most likely have the evaluation time function WhileReadingRecords or BeforeReadingRecords referenced in them.
    Try adding WhileReadingRecords to your new formulas (If CR can process those formulas at that time) and you should be able to see them in the Record Select Expert.

  • Return the end of week date using month and week number

    Hi all,
    I am trying to find the date for end of the week using given month (201401, 201402...i.e, 2014 is year and 01,02 are months) and week number (01,02,03...) for the year. For example if my month is 201402 and week_number is 06 then it return the week_date
    as 2014-02-08. Can you please help me in writing a sql statement for this scenario.
    Thanks in advance,
    Nikhil

    Current month is irrelevant
    with dt as (
       select dateadd(day, (6-1)*7, '2014-01-01') as xwk
    select dateadd(day, 7-datepart(weekday, dt.xwk), xwk)
    from dt;
    Change the "6" in the with statement to the week of interest and 2014 to the year of interest...

  • Hey Guys i have a problem with my mac since last month and it wont boot up it freezes in a grey apple logo and and spinning gear any body know how to fix this?

    Hey Guys i have a problem with my mac since last month and it wont boot up it freezes in a grey apple logo and and spinning gear any body know how to fix this?

    Take each of these steps that you haven't already tried. Stop when the problem is resolved.
    Step 1
    The first step in dealing with a boot failure is to secure your data. If you want to preserve the contents of the startup drive, and you don't already have at least one current backup, you must try to back up now, before you do anything else. It may or may not be possible. If you don't care about the data that has changed since your last backup, you can skip this step.
    There are several ways to back up a Mac that is unable to boot. You need an external hard drive to hold the backup data.
    a. Boot into Recovery by holding down the key combination command-R at the startup chime, or from a local Time Machine backup volume (option key at startup.) Release the keys when you see a gray screen with a spinning dial. When the OS X Utilities screen appears, launch Disk Utility and follow the instructions in the support article linked below, under “Instructions for backing up to an external hard disk via Disk Utility.”
    How to back up and restore your files
    b. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode by holding down the key combination command-T at the startup chime. Connect the two Macs with a FireWire or Thunderbolt cable. The internal drive of the machine running in target mode will mount as an external drive on the other machine. Copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    How to use and troubleshoot FireWire target disk mode
    c. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.
    Step 2
    Press and hold the power button until the power shuts off. Disconnect all wired peripherals except those needed to boot, and remove all aftermarket expansion cards. Use a different keyboard and/or mouse, if those devices are wired. If you can boot now, one of the devices you disconnected, or a combination of them, is causing the problem. Finding out which one is a process of elimination.
    Before reconnecting an external storage device, make sure that your internal boot volume is selected in the Startup Disk pane of System Preferences.
    Step 3
    Boot in safe mode.* The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. Post for further instructions.
    When you boot in safe mode, it's normal to see a dark gray progress bar on a light gray background. If the progress bar gets stuck for more than a few minutes, or if the system shuts down automatically while the progress bar is displayed, your boot volume is damaged and the drive is probably malfunctioning. In that case, go to step 5.
    If you can boot and log in now, empty the Trash, and then open the Finder Info window on your boot volume ("Macintosh HD," unless you gave it a different name.) Check that you have at least 9 GB of available space, as shown in the window. If you don't, copy as many files as necessary to another volume (not another folder on the same volume) and delete the originals. Deletion isn't complete until you empty the Trash again. Do this until the available space is more than 9 GB. Then reboot as usual (i.e., not in safe mode.)
    If the boot process hangs again, the problem is likely caused by a third-party system modification that you installed. Post for further instructions.
    Step 4
    Sometimes a boot failure can be resolved by resetting the NVRAM.
    Step 5
    Launch Disk Utility in Recovery mode (see above for instructions.) Select your startup volume, then run Repair Disk. If any problems are found, repeat until clear. If Disk Utility reports that the volume can't be repaired, the drive has malfunctioned and should be replaced. You might choose to tolerate one such malfunction in the life of the drive. In that case, erase the volume and restore from a backup. If the same thing ever happens again, replace the drive immediately.
    This is one of the rare situations in which you should also run Repair Permissions, ignoring the false warnings it produces. Look for the line "Permissions repaired successfully" at the end of the output. Then reboot as usual.
    Step 6
    Boot into Recovery again. When the OS X Utilities screen appears, follow the prompts to reinstall the OS. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.
    Step 7
    Repeat step 6, but this time erase the boot volume in Disk Utility before installing. The system should automatically reboot into the Setup Assistant. Follow the prompts to transfer your data from a backup.
    Step 8
    If you get this far, you're probably dealing with a hardware fault. Make a "Genius" appointment at an Apple Store to have the machine tested.

  • I was in Aussie last month and dropped my iPod Touch (4th Gen) on the road. The screen was cracked on the top left-hand corner. The screen got fixed but the wireless stopped working. Can I still get it fixed under my warranty? (bought last July)

    I was in Aussie last month and dropped my iPod Touch (4th Gen) on the road. The screen was cracked on the top left-hand corner (where the wireless area is). The screen got fixed but the wireless stopped working. So I am wireless-less... I bought it last July and its still under warranty, but can I still claim a repair on it?

    No because it was physical damage

  • HT201250 Is there a way to change the intervals at which Time Machine performs backups (e.g., weekly instead of hourly or daily) past 24 hours, daily for the past month, and weekly for everything older...

    Is there a way to change the intervals at which Time Machine performs backups (e.g., weekly instead of hourly or daily) past 24 hours, daily for the past month, and weekly for everything older...

    You can edit the interval in Console or install a Pref Pane
    called TimeMachineScheduler (Leopard or higher) free from:
    http://www.klieme.com/TimeMachineScheduler.html
    Good luck, Tom

  • Depreciation is not executed for last month and the period is closed. Giving Error in this Dep. Cycle.

    Hi All,
    We had a month End scenario where the depreciation for a company code is not executed for the last month and closed the period without checking it.
    While  running the Depreciation posting for this month we encounted a error that last motn period is closed. Can we do the depreciation without opening the period closed. Kindly let us know the options available.
    Regards,
    Lakshmi Narayana

    Lakshmi,
    There is no way you can post depreciation without opening the prior periods. Please discuss with your business and secure all necessarry approval, I believe the business has a process on this kind of situations. As long as it is fully documented, auditors will not find it wrong.
    This is the best time to improve your process, think of possible ways so that business will not forget to post depreciation (e.g send automatic email during 3 days before, 2 days before., 1 day before and during the day of depreciation run).
    Hope this helps.
    Thanks!
    Jhero

  • Chart: amount (count) of records per month (and year). How?

    I need to create a chart eventually. Can't get what formula to use. The data is:
    1 | 15 Jan
    2 | 20 Jan
    25 | 14 Mar
    26 | 16 Mar
    28 | 20 Mar
    The chart should show amount(count) of records per month(and year). So in this example:
    Jan: 2
    Mar: 3
    Hm... totally lost. Any tips?

    To do this it would be best to add a column in which you isolate the month from the rest of the date information. Here's an example:
    You may hide the Month-Isolated column if it impacts your presentation.
    The Month-Isolated formula is: =IF(ISBLANK(B), "", (MONTH(B)))
    The formula for the count in the Summary table is: =COUNTIF(Data Table :: $C, COLUMN())
    Hope this gets you on your way.
    Regards,
    Jerry

Maybe you are looking for

  • Content conversion in Sender JMS channel

    Hello All, My scenario is JMS to Proxy. SAP PI receives a flat file from JMS application. Can any one please help us on converting flat file to XML conversion within sender JMS adapter Thanks&Regards, Moorthy

  • HP dv5t-1000 is it had SPDIF port?

    Hi everyone, I had notebook HP dv5t-1000 and I want connect it to my home theater (amplituner) and I want use SPDIF connection but I'm not sure is my notebook had this connection type? Is anyone know, did my notebook had this connection type?

  • How to set iCal as the default calendar app again?

    So, reluctantly I bought and installed MS Office 2008 for Mac because OpenOffice was not a solution... However, now Entourage seems to be set as the standard application to handle ics files, although I clicked yes when iCal asked me if I wanted iCal

  • Time out 0CO_PC_ACT_02

    Hi Since one week we are facing time out problem when executing 0CO_PC_ACT_02. This is running in infopackage groups. Its ending in short dump "Time out". How can we solve this problem. Regards Rak

  • RV042 advanced Virtual Servers

    Hello I need advice if it is possible to configure RV042 in certain way. I have two public IPs assigned to WAN ports configured for load balancing, and accessing world from local netwok does work without problems. What I need (and had previously with