extracting remaning months of the year during the current month

Hello

I like allows you to retrieve the other months of the year from the current date.
Can I do this?

For example, it is today, July 23, 2012.
Then, I would like to have:

August
September
October
November
December

Thank you
Diana

Hi, Diana,.

Here's one way:

SELECT     TO_CHAR ( ADD_MONTHS (SYSDATE, LEVEL)
          , 'Month'
          )    AS month_name
FROM     dual
CONNECT BY     LEVEL     <= 12 - EXTRACT (MONTH FROM SYSDATE)
;

What output would you want in December?

Tags: Database

Similar Questions

  • date of the current month

    for a date column, I have data for a year

    Suppose I run the query on the month of August, I want to retrieve date during the month of August
    means I want to retrieve the data for the current month.

    This will still take the start date of the current month to the last day of the current month.

    WHERE col  BETWEEN  TRUNC(SYSDATE,'MM') AND LAST_DAY(SYSDATE) 
    
    OR
    
    WHERE col  BETWEEN  TRUNC(SYSDATE,'MM') AND TRUNC(ADD_MONTHS(SYSDATE,1),'MM')-1
    
  • Filter a report to take the date of closing days for the current month

    Hello.

    I need to create a filter on to only opportunities extraction that are expected to close for the month that we are in a report. By that I don't want to not just Augustus, but regardless of the current month is that the report is run

    The date 'Should close' is a timestamp field in our OnDemand.

    Thank you!

    Hi, you can create a SQL filter as below

    YEAR ("Closing Date". Date) = VALUEOF (NQ_SESSION. CURRENT_YEAR) AND MONTH (the "Closing Date". Date) = VALUEOF (NQ_SESSION. CURRENT_MONTH)

    Hope this works

    -John CRMIT

  • How to copy the data for the current month for future months based on the current month

    Hello

    If the current month is Jan they copy data Jan rest months this year there. If the current month's data copy Feb Mar Feb, Apr, dec... and so on... The following script can achieve this goal, but it increases the number of lines of code... Please y at - it another way that we could achieve this functionality.

    Difficulty (year1, entity1)

    "account1" (if (& Currentmonth == "Jan"))

    "account1"-> "Feb" = "account1"->"Jan";

    "account1"-> "Mar" = "account1"->"Jan";

    ------

    ---

    "account1"-> "Dec" = "account1"->"Jan";

    ElseIf (& ifcurrentmonth == 'Feb')

    "account1"-> "Mar" = "account1"->"Feb";

    --

    "account1"-> "Dec" = "account1"->"Feb";

    endif ;);

    endfix;

    Thank you

    Praveen

    Hi Praveen,

    You can write a script as shown below

    Fix(Year,Entity,&Currentmonth:DEC)

    Account1 = account1-> & Currentmonth;

    endfix

    This will make.

    Concerning

    Anubhav

  • How to get the old data 6 months from the current date?

    Hi friends,

    I have a table which includes historical data, which are having more than 1 years old data. The historical table gets updated once a week. My requirement is that I should get the latest data from the week of each month for 6 months according to the current data. I use oracle 10g.

    Can you please someone help in this.

    Thanks in advance

    SELECT last_day (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL))-7 start_dt.
    LAST_DAY (ADD_MONTHS (TRUNC (SYSDATE, 'mm'),-LEVEL)) end_dt
    OF THE DOUBLE
    CONNECT BY LEVEL<=>

    change as a result, I have provided you the start and end dates for your logic...

  • How to compare a Date with the current year data and member of period on FIX

    Hi experts,

    I have a Sun project that each Member is a project (P01, P02,...)
    and account IMGs who stores the information of each project (name, Start date, finished...)
    Finished Date member is of data type Date

    So how can write an IF condition below in order to be able to compare the end Date of the project with the members of the current year and period on FIX
    DIFFICULTY (@Descendants (Projects), Descendants (year-round), Descendants ("year Total")...)
    IF (@CURRMBR (Period)-> @CURRMBR (Year) < Project > - FinishedDate)
    Do something...
    On the other
    Do something


    Please help me on this. Sorry for my bad grammar. Please ask if there is something not clear

    Thank you very much
    Van Huy.

    Published by: Van Huy on 29 January 2013 01:14

    Published by: Van Huy on 29 January 2013 02:24

    Published by: Van Huy on 29 January 2013 02:25

    Published by: Van Huy on 29 January 2013 18:04

    Here's what I did. Post for which may later cover

    VAR FM; / * End of month of the project.
    VAR EXERCISE; / * Year of the project terminated * /.
    VAR CM; / * Capture the current month on FIX declarations * /.
    VAR CY; / * Capture current year on FIX declarations * /.

    DIFFICULTY (@RELATIVE ('year', 0), @RELATIVE ('period', 0), @IDescendants ("core projects")...)

    FY = @ROUND ('TGHT'-> ' NA contract "-> 'FY06'-> ' NA period" / 10000, 0);
    FM = @MOD (@ROUND ('TGHT'-> ' NA contract "-> 'FY06'-> ' NA period" / 100, 0), 100);
    / * For FY13 back 13... */
    CY = @JgetDoubleFromString (@CONCATENATE ('20', @SUBSTRING (@NAME (@CURRMBRRANGE (year, Lev, 0, 0, 0)), 2)));
    / * Value CM set based on perceived period on the DIFFICULTY of statement * /.
    IF (@ISMBR ("Jan"))
    CM = 1;
    ELSE IF (@ISMBR ("February"))
    CM = 2;
    .....
    ELSE IF (@ISMBR ("Dec"))
    CM = 12;
    ENDIF

    IF (CY< fy="" or="" (="" cy="=" fy="" and="" cm=""><>
    Do something...
    ON THE OTHER
    Do something...
    ENDIF
    ENDFIX

    Published by: Van Huy on 19 February 2013 23:10

    Published by: Van Huy on February 20, 2013 19:46

  • Retrieve the current year in the list of members

    Hi all

    Is there any function in the member lists to retrieve the current year? Example:

    = Month() Returns current month

    Thanks a lot for your help.

    Benoit

    I do not recommend the use of this code...

    Prior_Month_Date = Now() - 28
    

    IF you want to determine the previous month, use the DateAdd command...

    Prior_Month_Date = DateAdd("m", -1, Date())
    

    Charles

  • Copy of retained earnings in the current year to the future year

    Hi all

    I want every month of year (2013) the future of a group of entities to the exemplary gains kept of current (December 2012).

    My dimension structure is

    Retained_Earnings_Total
    -1000_Retained_Earnings
    -1100_Retained_Earnings_Acquired
    -Retained_Earnings_Current_Activity

    I want the value of 2012-> Dec-> Retained_Earnings_Total to copy to 2013-> 1000_Retained_Earnings (for each month). The code I used is


    DIFFICULTY ('Jan': 'Dec', @LevMbrs("Product",0), @LevMbrs("Location",0), @LevMbrs("Cost Center",0), @LevMbrs ('Channel', 0))

    FIX (& FutureYr, @Relative("Desired_Entity_List",0))

    Fix ("1000_Retained_Earnings")

    'Local' = FcstBS-> & CurrYr-> 'Dec'-> 'Retained_Earnings_Total'-> 'Local ';
    & RateCurrFcst = RateCurrFcst-> & CurrYr-> 'Dec'-> 'Retained_Earnings_Total',-> & FcstBS;
    ENDFIX

    ENDFIX

    ENDFIX

    Sub Variables: & FcstBS = Balancesheet7 + 5 & RateCurrFcst = USDForecast7 + 5Rates & CurrYr = 2012 & 2013 = FutureYr.

    Data for the FutureYr are not getting copied from Dec, current year. Can someone help me please?

    Using Essbase v11.1.1.3.

    Thank you

    Published by: Ministry of Foreign Affairs on August 19, 2012 19:41

    Published by: Ministry of Foreign Affairs on August 19, 2012 21:10

    Hello

    This seems a problem of creation of block as indicated by Ringo.

    I would use DATACOPY to copy the data from the current year-> dec to the future-> jan/begbalance. And then I copy data from jan/begbalance for the remaining months of the coming year.

    Something as follows (assuming the dimension that contains the members Retained_Earnings_Total as spare and as dense period);

    DATACOPY & CurrYr-> 'Dec'-> 'Retained_Earnings_Total' to & FutureYr-> "Jan"-> "1000_Retained_Earnings";

    And then copy data from January of the coming year in the last months of the coming year.

    DIFFICULTY (Feb:Dec and any combination of the years to come)
    "Local" = "Local"-> "Jan";
    & RateCurrFcst = & RateCurrFcst-> Jan;
    ENDFIX

    That you'd be using DATACOPY, block would be created when it is required for fastest way.

    Ministry of Foreign Affairs wrote:
    Lol data may not have filled in the destination. I tried to use CREATENONMISSINGBLK the ON VALUE, the script took a little longer but the filling of another value.

    I think that for creation of block, in this scenario, using the VALUE CREATENONMISSINGBLK ON you will be asked to create a member of spare member block. (However, this creation of block might take longer than datacopy)

    I hope this helps.

    Concerning
    -SM

  • turnover of 18 weeks from the week of the current month number

    Hello

    I have a requirement as described below.

    Time table name:
    Columns: year, month of exercise and exercise week

    table above has the join with the sales table and contains data on sales according to the week. so less granularity of data at the level of the week.

    We have a report that contains columns exercise, actual sales and forcast sales. our requirement is to filter the data with the following criteria.

    Filter for the current month
    Fiscal week Jan between 1-18 of the current year
    Fiscal week Feb between 5-23 of the current year
    Week fiscal March between 9-27 to the current year

    .
    .
    .
    .
    Fiscal week November between 44 the week of the current year and week 10 of next year

    December

    with above requirement therefore filter the data bearing 18 weeks from the week of the current month number


    I tried with timestampadd (interval, sql_tsi_week, week), but it does not work as I expacting. Please provide the code/logic to do so.

    Appreciate your help.

    Thank you
    Jay.

    Jay wrote:
    I need to get the results of 18 weeks of turning to anypoint starting with the week number of the 1st of every month at 18 weeks. read my question again once and you will be able to understand.

    It kind you of lack the point to be honest. It is very difficult to answer specific questions without the required information. To answer a question like this we need a minimum of:

    1. oracle version
    2. examples of data (CREATE TABLE / INSERT statements)
    3. expected results
    4. explanation of the business rules.

    Alternatively, you can read the link in my original reply.

    Please provide the information requested and someone can help.

  • Script for updating a field for the current year

    Is it possible to have an update of field at the end of the current year? Example 20-(dashes to change it for any year). I think that it is not possible, but if anyone knows how this is possible I'd really appreciate help. Thank you

    Sorry, I guess I need to change throughout the year, not only at the end.  Thank you

    I tried a few scripts that I found here, such as; year (dateAdd ("yyyy", 1, now()))) with no luck. I confess that I don't know about scripts and can be a bad thing. The script goes on the Action tab as a javascript or somewhere else (validation?) Any advice or assistance would be appreciated. I use Acrobt Pro version 9.

    Going by your post you wanted the year is displayed in a text field, I gave the code to go into the script will count for this field. If you want to use it somewhere else (e.g. a mouseup), then use the variable 'year' in this script. In a calculation script, any value you assign to "event.value" is what will show on the field during the calculation.

  • How complete the current year one year Net income in profits not distributed

    We had details in a Dimension of 4 Custom in our new application of IFRS. We call this type of data. Basically we use for detailing the different types of adjustments for IFRS. The problem is the total P & L are copied into the retained earnings for the 4 total of Custom Dimension but not for the descendants of 4 personalized with the exception of [none] members.

    This is the rule:

    "Goal: complete the current year one year Net income in retained earnings"
    KSM erase 'a #L3310 '.
    "KSM Exp ' an L3310 #" & NUNS & "= W #YTD. A LA8999 # "& TOPS"

    What would be the best practice?

    Amendment to the rule on the right side and specified Custom 4 descendants? In this way the Net income will be copied to all members of dimension 4 Custom

    What would happen in the future when we will integrate the business unit in detail in our personal 2? Wouldn't be good practice to change the right side of the rule and put personal descendants 2?

    According to what I saw during the copy of profit form P & L retained we copy only the best members. If bifercation is necessary, then break us into the P & L not profits not distributed.

    I would also advice allows you to copy the top member PKI (place it to the right) ICP None(place it on the left) so what are not disadvantaged as the accounts of PKI, if not retained earnings could not show correct result. This happens for autonomous entities. Since P & L has no intersection of PKI. That the data will not get copied into retained earnings.

    Hope this is useful

    Also, if you find useful or correct answer kindly mark.

    Varun

  • Is it possible to extract or to recover the loss of personal data from my account from Firefox?

    Not knowing what it really meant, I ticked the box that says "remove my Firefox personal data and customizations' that I uninstall Firefox. (I just thought that it will remove it from my computer... but not from my account!) Now that I have reinstalled it, I realized that meant delete all my personal data from my account from Firefox. -- Is _ possible to recover?

    No, I'm afraid not. If you choose to delete personal data during the uninstallation of Firefox all the Firefox profile folders are deleted. Not only the current version of Firefox, but others also if any other Firefox installed builds. This choice must be used with great care.

    You can try to recover some data with undelete as Recuva utility.

  • Extract and save all the channels of the PXI-5105 with 4 M of edge detection... Help!

    Dear collegaues!

    Please help me to improve my request, exhibit attached and sorry for my English.

    So my task is to extract and save all the channels (eight) of the PXI-5105 with 4 M of detection of peaks and sample rate 4 M with loop 1 sec...

    Entered all my channels are wiring detectors NaI with 0, 5... 1 microsec pulse (really) width and 0 kHz at not more than 40 kHz freq.

    Why I chose the registration of 4 M and the sampling frequency of 4 M namely? Answer is that I tested previously PXI-5105 40 kHz generator and pulse width 0.5 microsec. It works great and detection of peaks indicate 40000 pulses/s for me. If I set lower than 4M record and sample rate of 4 M, it is without work. In my honest opinion record 4 M and the frequency of sampling of 4 M are parameters very min.

    In the detection of peaks time present only 6 working channels... When I connected to diagram more 6 "detector.vi peak" - I see the error "...". out of memory... ».

    Advise me please, what needs to be done to it, it's all working well.


  • Retrieve the current month

    Hi guys,.

    I'm recovering from the current month. The code is as follows:

    Calendar.getInstance (TimeZone.getTimeZone ("GMT")) .get (Calendar.MONTH)

    It works very well... I expect instead, he returned 11, not 12! He is 0-based? I don't think, because I have found no reference to this subject in the docs or here in the forums. Application for the work number current date as expected in fact.

    It returns 11 on the Simulator and real phones (a "BOLD" and a 8310). The system calendar is set correctly to December, of course.

    Any clue?

    Use no comparison with what is called "magic" numbers

    He has months constant defined in the Calendar class:

    public static final int DECEMBER
    

    Compare the return value with the constants that represent the months.

  • List date values in the current month and previous month next month

    Hello. I am looking for a way to query a list of each value date in the current month, previous month and next month.

    1 DECEMBER 15

    ...

    ...

    31 DECEMBER 15

    1ST JANUARY 16

    ...

    ...

    30 JANUARY 16

    1 FEBRUARY 16

    ...

    ...

    28 FEBRUARY 16

    Any help would be greatly popular!

    with the data (start_date and end_date) as)

    Select Add_months (trunc (sysdate, 'month'),-1),

    Add_months (trunc (sysdate, 'month'), 2)

    of the double

    )

    Select the level - 1 the_date + start_date

    from the data

    connect by level<= end_date="" -="">

Maybe you are looking for

  • transfer music

    My old computer crashed and I need to transfer my music from my iphone 6 more for my new computer.  The music was not purchased at the istore.

  • Anti virus

    I think that discussions in the past that the general opinion on antivirus software, is that they are useless. Some time back I had a few emails Intego with severe warnings of risk and now that my subscription is coming up for renewal I wonder if the

  • Help with the driver DvD Ram for satellite P10

    On my laptop (satellite p10) is Windows 2000 Professional running, but the driver DVD Ram of the Toshiba Homepage does not...Where can I get a driver that works on my laptop?

  • PC pavilion 15 laptop: laptop Hp pavilion 15 t - it have a PCI?

    My laptop has a pretty puny graphics card an iris 5400 cards but to play games that are more graphically demanding that I need a replacement card. I know that you can't replace, but found it a device that you plug on your location of peak of laptops

  • 2 VPN to separate networks with the same intellectual property regime

    We have an office in Bermuda and 2 offices in Chicago. 2 offices in Chicago have the same pattern of IP - 10.150.1.0/24. I would like to set up a VPN site-to site of Bermuda for each of the offices of Chicago. I have one up and it works fine. When I