Select list that displays the next 12 months worth of Mondays

I recently needed a select list that would allow you to choose from a years worth on Mondays starting with the current week's Monday. It will return the date of that Monday. I thought others might be able to use this too... Plus I wanted to be able to find this in the future.
SELECT DISTINCT
to_char(trunc(next_day(trunc(SYSDATE,'day'),2)-1+LEVEL,'iw'),'FMMonth DD, YYYY') AS Display
,trunc(next_day(trunc(SYSDATE,'day'),2)-1+LEVEL,'iw') as Return
FROM dual
CONNECT BY LEVEL <=((add_months(trunc(SYSDATE,'day'),12)-1)-(trunc(SYSDATE,'day')))
ORDER BY 2;
As of today (Friday, August 24th) the above would return:
DISPLAY RETURN
August 20, 2012 20-AUG-12
August 27, 2012 27-AUG-12
September 3, 2012 03-SEP-12
September 10, 2012 10-SEP-12
September 17, 2012 17-SEP-12
September 24, 2012 24-SEP-12
October 1, 2012 01-OCT-12
October 8, 2012 08-OCT-12
October 15, 2012 15-OCT-12
October 22, 2012 22-OCT-12
October 29, 2012 29-OCT-12
November 5, 2012 05-NOV-12
November 12, 2012 12-NOV-12
November 19, 2012 19-NOV-12
November 26, 2012 26-NOV-12
December 3, 2012 03-DEC-12
December 10, 2012 10-DEC-12
December 17, 2012 17-DEC-12
December 24, 2012 24-DEC-12
December 31, 2012 31-DEC-12
January 7, 2013 07-JAN-13
January 14, 2013 14-JAN-13
January 21, 2013 21-JAN-13
January 28, 2013 28-JAN-13
February 4, 2013 04-FEB-13
February 11, 2013 11-FEB-13
February 18, 2013 18-FEB-13
February 25, 2013 25-FEB-13
March 4, 2013 04-MAR-13
March 11, 2013 11-MAR-13
March 18, 2013 18-MAR-13
March 25, 2013 25-MAR-13
April 1, 2013 01-APR-13
April 8, 2013 08-APR-13
April 15, 2013 15-APR-13
April 22, 2013 22-APR-13
April 29, 2013 29-APR-13
May 6, 2013 06-MAY-13
May 13, 2013 13-MAY-13
May 20, 2013 20-MAY-13
May 27, 2013 27-MAY-13
June 3, 2013 03-JUN-13
June 10, 2013 10-JUN-13
June 17, 2013 17-JUN-13
June 24, 2013 24-JUN-13
July 1, 2013 01-JUL-13
July 8, 2013 08-JUL-13
July 15, 2013 15-JUL-13
July 22, 2013 22-JUL-13
July 29, 2013 29-JUL-13
August 5, 2013 05-AUG-13
August 12, 2013 12-AUG-13
52 rows selected

I posted the above all proud of myself for figuring out the SQL to do the above, went into APEX to build my LOV and I get the following:
LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
Is there a way to get APEX to allow me to use the above query as an LOV?
Thanks,
Rich

Similar Messages

  • Itunes on my iPhone 5 only displays the artist list with the UP NEXT feature.  How can I change the UP NEXT feature on my iPhone 5 to display the next songs that are to be played on my play list?

    Itunes on my iPhone 5 only displays the artist list with the UP NEXT feature.  How can I change the UP NEXT feature on my iPhone 5 to display the next songs that are to be played on my play list?

    Hi Sarah,
    It sounds like the songs have either not yet synced over to the iPhone, or something went wrong when attempting to sync to the iPhone. My recommendation is to uncheck the "Sync Music" checkbox.
    Once you have done that, recheck the "Sync Music" checkbox, and apply the changes once more. This will instruct iTunes to completely remove all music from your iPhone, and then copy the files once more. If you have a large amount of music, this initial sync may take a while.
    If the above does not resolve your issue, see the following articles:
    iOS: Syncing with iTunes
    http://support.apple.com/kb/HT1386
    iOS: How to transfer or sync content to your computer
    http://support.apple.com/kb/HT1296
    Thanks,
    Matt M.

  • I can't be the only person who has this problem - when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that

    I can't be the only person who has this problem with iCal- when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that.

    Yeah that works, but, it involves a click on the event, a click on edit, a click on the date, keystrokes, plus, since you can't see the next month you have to have a calendar in front of you so as to put it to the right date. It's easier just to cut it and advance the month and paste it, once you are in the right month you can move it around helter skelter willy nilly no problems. Although now that you mention it I will try it, maybe it is easier than cut and paste as I don't really care about the date, as long as it gets moved into the right month I can drag it around all I want.

  • How to keep showing items created in current month for 5more days only in the next month by OOB functionality only

    Hi,
    I have a Time Reporting site where users log in their time twice a month.This site uses only Out Of Box functionality. There is no scope for coding in my site.
    In the list i have created a view which shows the Time Report of the user logged in for the current month only.
    There is a new requirement : Current month's Time Report should be visible to the users in the next month for 5 starting days of the month only so that users can edit this month's Time Report in the next month's 1st 5days incase they forget to edit it in
    the current month.
    e.g: If i am absent on the last day of the month , my time report for this month(March) should be visible for 5 days in April so that i can stiil edit March's time report. However after 5days the Time Report for March should not be visible. After 5days only
    April's time report will be visible when submitted(April's time report).
    Please can anybody help me out with this.
    Regards ,
    Guru

    Hi Guru, you have a couple of options: 1) set a retention schedule through the list's settings> Information Management Policy Settings. Where the start date < start date + 35.
    2) create a view and filter by the date like above.
    These aren't perfect scenarios, but will get you close to what you want.
    cameron rautmann

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Hi,i just bought the Creative cloud membership and i would want to know why is t one year policy and you payed alot of money and still pay for the next month? Annual means yearly right ? why do i have to pay another next month.

    Hi i just want to know i bought the creative cloud and photoshop and premiere. All those and it said annual meaning i have to pay for the next year right? But why did it said that i have to pay for the next month? What happens  when i didn't pay the next month ?

    You may buy an annual subscription and pay monthly, or a straight monthly subscription... and, being a subscription, if you stop paying the software stops working
    If you want a one time payment, and you can use 3+ year old software, go to Creative Suite 6

  • How to handle Select List that also needs data entry?

    I have a few "Data Entry" situations that can I would like to be able to use a "Select List with Submit" but also allow the user to type in a new value. What is a method to handle this from the data entry perspective?
    Example:
    Database table contains columns:
    ClassName
    AttributeName
    A new AttributeName is going to be added to this table. The AttributeName could either be added into an existing Class or a new Class could be created. If the new Attribute is being added to an existing Class, I would like to select the value from a "Select List" populated from distinct ClassNames from this table (this part works easy with a Select List with Submit). If the Attribute is being created in a New Class, I am not sure the best approach to handle it? I have experimented with the popup LOV and it is not a perfect fit.

    Steve,
    I have done a similar implementation in my app. I have a region with a select list with submit, and a button saying "create new data". I have another region on the page with a form, based on my table. If something is selected in the select list, I populate the form using a pl/sql block. If the button "create new" is clicked, i clear the form and allow the user to enter data, and run a conditional insert pl/sql.

  • Actual activity cost should be planned for the next month

    Hi,
    I need the solution like this. Our fiscal year April to March. We want the actual activity prices of the April should be planned for the May month. And may month actual prices should be planned for the next month. Like that we want use our activity prices.
    For this where we have to configure and what transaction codes we have to run in month end.
    please guide me
    Sateesh

    Srikanth,
    I know KP26 will be maintained for plan values.
    This month actual should be planned for next month. and next month actuals should be planned for coming month.
    Please guide me where i have to confiure this type of requirement.
    Sateesh

  • How to create a function to get the 16th of the current month and the 15th of the next month

    I need to create a function to get the 16th of the current month and 15th of the next month to use it in the fast formula to calculate the sick leave.
    Example:
    If an employee takes a sick leave from 16 feb 2015 to 17 feb 2015 , I want it to affect march's payroll not February.
    Please help and thanks in advance.

    Below statement gives you the result. Use the concept and write your PL/SQL function.
    select TO_DATE('16-'||TO_CHAR(SYSDATE, 'MON-RRRR')), TO_DATE('15-'||TO_CHAR(add_months(SYSDATE, 1), 'MON-RRRR')) from dual;
    Or you can use same construct directly in the fast formula by changing syntax accordingly.
    Regards,
    Peddi.

  • Select list that is dependent on another select list with ajax

    I have a select list that contains it (ajax)
    onchange = "get_select_list_ajax (this, 'P2012_REQUERENTE', 'COMBO_REQUERENTE_ITEM', 'COMBO_REQUERENTE_AJAX');" class = "largura200"
    So I have a select list below, which is conditional, according to the value returned from the select list P2012_Cliente.
    DECLARE
    v_tipo VARCHAR2 (50);
    BEGIN
    SELECT DISTINCT (id_cliente_tipo) INTO v_tipo FROM vw_cliente
    WHERE customer_id =: P2012_CLIENTE;
    IF (v_tipo = pkg_cfg.c_tp_cliente_interno) THEN
    RETURN true;
    ELSE
    RETURN false;
    END IF;
    EXCEPTION WHEN OTHERS THEN
    NULL;
    END;
    But is not working .. Why? He is not detecting the return of the select list that is Ajax?

    How can I send the return of a select list (ajax) on a text item?
    html_form_attributes of sel. list -> onchange = "get_select_list_ajax (this, 'P2012_REQUERENTE', 'COMBO_REQUERENTE_ITEM', 'COMBO_REQUERENTE_AJAX');" class = "largura200"

  • I want to get the free trial however do I have to pay for the next month?

    Please answer ASAP

    Hi there, Chyakka, and welcome to the Skype Community!
    Click to enlarge Thanks to my browser and the reply button, your full question was
    "I want to get the free trial. However, do I have to pay for the next month?"
    I'm pleased to inform you that the answer is no. You are under absolutely NO obligation to continue your subscription if you don't unconditionally want to. (Really, though, why would you cancel your subscription with the lowest rates in online telephony?)
    After 27 days, your subscription automatically renews. Cancel within the 27 days and you won't be charged for the full amount of the subscription on a month-to-month basis. For your reference: A month-to-month Unlimited World subscription is US$13.99 and can get as low as US$11.89/mo. when you prepay for one year (a 15% off discount.) Prices mentioned are pre-tax amounts where applicable. To learn how to cancel your subscription, which takes no more than a few minutes of your time, check out this support article. (You have my promise that this isn't rocket science!) Thanks for trying out one of Skype's most valuable subscriptions and I hope you enjoy Skype as a whole! If you have any more questions or concerns about Skype, don't hesitate to post again to the community!

  • How to get the last day of the next month?

    Hi all.
    I need to get the last day of the next month. E.g. if the date is 20.03.2008 I need to get 30.04.2008.
    Is there any FM for it?
    TIA, Nikolai.

    hi Nikolai,
    pls. have a look athe following piece of code:
    PARAMETERS : p_date TYPE sy-datum.
    DATA : gv_res TYPE sy-datum.
    CALL FUNCTION 'CALCULATE_DATE'
    EXPORTING
    *   DAYS              = '0'
       months            = '2'
       start_date        = p_date
    IMPORTING
       result_date       = gv_res.
    ==> Now you have (gv_res) 2 months later as today
    gv_res+6(2) = '01'. ==> gv_res is first day of next-next month
    gv_res = gv_res - 1. ==> gv_res is last day of next month
    hope this helps
    ec

  • Where do I find the list that loads the programs at start-up so that I can disable some.

    Where do I find the list that controls the program loading at start-up. Also how do I know which ones I can disable. I am trying to speed up the start-up process.

    See http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx Autotruns

  • Last Date of the next month

    Hi,
    How to find the last date of the next month.
    Thanks in advance
    Sunitha

    Use the below mentioned FM
      call function 'LAST_DAY_IN_PERIOD_GET'
        exporting
          i_gjahr              = p_finyear
          i_periv              = 'X1'
          i_poper              = lv_popere
        importing
          e_date               = p_edate
        exceptions
          input_false          = 1
          t009_notfound        = 2
          t009b_notfound       = 3
          others               = 4.
      if sy-subrc <> 0.
      endif.
    Supply the proper parameters, u will get the last date in  the next month.

  • The large image that displays the current weather has dissapeared?

    On my weather app and on the notification centre widget, the large image that displays the current weather (inbetween your location and the current temperature) has dissapeared. All the infomation given by the app and widget is correct and the smaller weather icons still appear within the app and widget but not the larger one?
    Can anyone explain the cause of this and give me a solution to fix it? Thanks

    Hi fedotenko,
    If your main objective is to print the images and merely not saving the images directly to the disk...I think you want to print these images without scrolling and the full content...So you can do something like below:
    // Here mainContainer is the container or box id the contents of which you want to print
       private function doPrintContainer():void
        var printJob:FlexPrintJob = new FlexPrintJob();
        if(printJob.start() != true) return;
        try
         var mainContainerHeight:int = mainContainer.height;
         //Increasing the height of the desired component to be printed.
         mainContainer.height = mainContainer.measuredMinHeight;
         mainContainer.verticalScrollPolicy = "off";
         //Adding the resized Component to our FlexPrintjob and then sending the print request
         printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);    
         printJob.send();
         //Resizing the component back to normal size
         mainContainer.height = mainContainerHeight;
         mainContainer.verticalScrollPolicy = "auto";    
        catch(error:Error)
                     trace("Error : " + error.message);
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

Maybe you are looking for

  • Printed Purchase Order Report  R12

    Hi, I'm looking for Oracle Printed Purchase Order Report rdf file POXPRPOL Could you let me know the path to get this rdf. Thanks.

  • Trouble connecting to excisting wifi for airplay

    I want to use my stereoset for airplay but can't seem to figure out how to connect my airport express to the wifi. I have an Airport time capsule router (A1355), Airport Express 802.11n (A1264), a macbook pro (OS X 10.9/mavericks) and my airport util

  • A problem in RMI with JSP..pls help

    RMI with Java is working fine,but... 1. I am facing a problem when i use RMI with JSP..its throwing an exception during "Naming.lookup"..here is my code snippet: // i have stored the ServerInf and other classes in a package and i have imported it in

  • Non ALV

    hi all am using the below statement using an ALV am getting the desired output but am using the below statements for a non-ALV  report the first select statememnt that i mentioned below is executing and retreving the data but the second select statem

  • Fake Prepopulate

    Hello I have a situation where all the provisions of a user's account on a resource are done by operators (with the neccessary roles to be able to directly provision a resource). The operators should be able to see the user's manager on the form of t