90 days before the last month

Hi guys,.

Can someone help me to recover data that are 90 days before the last month of a current month.

Say that the current month is March then I need to get data that are 90 days before the month of February.

Your timely assistance is appreciated

Thanks in advance

Like this?

where date_field between trunc (add_months (trunc (sysdate),-1), 'months')-90

and trunc (add_months (trunc (sysdate),-1), 'month')

Tags: Database

Similar Questions

  • How to get the last business day of the previous month?

    Hi all

    We need the user as below,

    If the user select 18 June 2015 ' quick dashboard as the input value, and then they want to see last month last day of work (business date: 29-may-2015) amount in report, if you have an idea please share with us.thanks

    Note:

    use under request we can able to get the last day of the previous month, we want to for the last business day of the last month, based on the date of entry of the user?

    TIMESTAMPADD (SQL_TSI_DAY,-(1), TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ("DIM_TIME". ("" DataDate ") *-(1) + 1,"DIM_TIME ". (("" DataDate "))

    Thank you

    Deva

    Try this,

    case when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 1 then timestampadd (sql_tsi_day, (Dayofmonth(Date '2015-06-15') *-1)-2, Date '' 2015-06-15) when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 7 then timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1-1, Date '' 2015-06-15) another timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15') end

    As Ftsiot said in this post, it will work only to exclude the sat and Sun. Another one if you want to exclude regional holiday, you may need a calendar in DB table.

    Thank you

    AJ

  • How to get the last date of 3 days for the current month?

    Hello. Guy

    How to get the last date of 3 days for the current month?

    MY OUTPUT WOULD LOOK LIKE THIS

    JANUARY 29, 2016

    JANUARY 30, 2016

    JANUARY 31, 2016


    GUYS HELP ME / / /...

    SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">

    LAST_DAY)

    ---------

    29 JANUARY 16

    30 JANUARY 16

    31 JANUARY 16

  • How to get sales last day of the previous month

    HELO guys

    I have a question how do I get sales date last day of the previous month where my fact table is level. in fact I tried using Ago but it seems not working. for example, if I chose December 29, 2014 so if I used the function there are then the result will display data on November 29, 2014 (not the last day of November 2014).

    Please guys if you have any solution and I really advise thanks to you.

    Not exactly under what circumstances specific as you try to reach this goal, but suppose you have a few guest dashboard where you select a day and you have a report with a measure where you want to show the sales of the last day of the previous month based on the selected date in the dash prompt.

    If you change the formula of this measure to something like:

    FILTER (with the HELP of 'Sales' (DATE = TIMESTAMPADD (SQL_TSI_DAY-1, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH(@{PV_DATE_SELECTED}) * (-1) + 1, @{PV_DATE_SELECTED}))))

  • I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    I recently got 'Class not registered' when you try to open my PDF files. This didn't happen before the last 2 days

    Hi Meenakshi,

    Thanks for getting back to me. The problem is solved now. We had to reinstall Acrobat DC who, for some reason, had disappeared.

    Regards, Randy

  • Programming logic needed to retrieve the records for the last month/week

    Hi all

    I need assistance in programming SQL logic.

    Oracle database version: 10.2.0.3.0

    Requirement

    In an environment of DW, I need to program to weekly and monthly automated batch insert the data from Data_tbl to Reporting_tbl to generate reports. Descriptions of paintings are given below.

    Table 1 - Data_tbl (Source of table - this table is updated daily).

    Record_dt first name last name


    Table 2 - Reporting_tbl_ (the target table)

    Cycle_dt first name last name

    1. monthly report

    In the SQL query, I where clause conditions.

    Where Record_dt > = 1 November 08 ' and record_dt < = 30 November 08 '

    Using the above condition in development, I'm pulling over the last months data source table data. This will be repeated every month, and it should be automated.
    that is, if I run this report at any time in December 2008, he should choose documents dates from Nov 01 to November 30, 2008. If I run this report at any time in January 2009, he should choose documents dates to Dec. 01 to December 31, 2008.
    Date values must be assigned for the last month. Value of Cycle_dt in the target table must be the date of the end of last month as on November 30, 2008, 31-dec-2008.


    2 weekly Report

    In the SQL query, I where clause conditions.

    Where Record_dt > ='01-dec-08' and record_dt < ='' 07-dec-08

    Monday week start date and end date is Sunday.
    If I run the report between the 08 Dec-14 Dec, it should make records of the dates of Dec. 01 to December 7, 2008.
    On 15 December, he should seek from 08 Dec-14 Dec.
    Value of Cycle_dt in the target table must be the date of last weekend, as on December 7, 2008, December 14, 2008.
    Please help me with the logic for both monthly and weekly reports.

    Thank you

    Hello

    TRUNC (dt, 'W') is the beginning of the week, which may be different days, according to the NLS parameters in your session. Unless you want something that varies from one session to the next, you should stick with the weeks of ISO.

    TRUNC (SYSDATE + 1, 'IW') - 1
    

    is the Sunday of the week underway Sunday to Saturday, which starts and ends in 1 day before the ISO week.
    To find the precedent of the week from Sunday to Saturday:

    WHERE   record_dt >= TRUNC (SYSDATE - 6, 'IW') - 1
    AND     record_dt <  TRUNC (SYSDATE + 1, 'IW') - 1
    

    If you were interested in a week from Saturday to Friday (either 2 days earlier than the ISO week):

    TRUNC (SYSDATE + 2, 'IW') - 2
    
  • iPhone 6s battery was terrible in the last month?

    My iPhone 6 s the battery was amazing, since I got last September, it was to last all day. I used to load at 07:00 and remove it for free at about 08:00 every morning and it would normally be 100%, I would use 3 g, music, apps all day and from 16:00, it's only 50-70%. Sometimes the battery would not yet go down when I listened to the music. But in the last month, he got about as bad as my battery of iPhone 5 has been. The battery will drop so quickly. I always let it charge up to 100%, then listening to music, but instead of the battery down not at all, it goes down by 10-20%! Now by the time its 16:00 my phone is off fees or on red. Also at random, my phone turns off. Tell if its on 15% turns off even if theres left battery and used to turn until I load it again. I liked my 6s more and one of the reasons why I got was for the amazing battery life. I would say that I used all the same as I did when the battery was good, so I have no idea what went wrong. Can anyone help?

    * MAY I ALSO ADD THAT WHEN THE BATTERYS DOWN VERY FAST SA ALSO WE LOW POWER MODE *.

  • graphic display of performance for the week or the last month?

    Using a VSphere Client 4.1.0 to display an ESX 4.1.0 Server, I am looking at the graph of the performance of the processor (for example).

    When I go into "Options", what I see under CPU options is 'real time' and 'last day '.  Below, time go specifications ('last n periods' and ' a + for ' are all gray.)

    Is there any where that I can set collection or the length to collect & graph interval a longer history, such as week or the last month?

    Thanks for the tips... Lyle

    something greater than what you can buy vmware vcenter.

  • Function to retrieve all the days of the previous month.

    Hello

    Yes, it's a monthly report, I received the task at hand.

    So, all I need is every day of the previous month (even if there is no data for that day)

    I was instructed to use the following code, but it does not return a value any:
    DECLARE
       CURSOR CUR_LAST_DAY IS
          SELECT TO_CHAR (LAST_DAY (ADD_MONTHS (SYSDATE, -1) ), 'DD')
            FROM DUAL;
     
       VVA_LAST_DAY   VARCHAR2 (2);
       --
       VNU_JOUR       NUMBER       := 0;
    BEGIN
       OPEN CUR_LAST_DAY;
     
       FETCH CUR_LAST_DAY
        INTO VVA_LAST_DAY;
     
       CLOSE CUR_LAST_DAY;
     
       WHILE VNU_JOUR <= TO_NUMBER (VVA_LAST_DAY) - 1
       LOOP
          VNU_JOUR := VNU_JOUR + 1;
       END LOOP;
    END;
    --CLOSE CUR_LAST_DAY
    --DEALLOCATE CUR_LAST_DAY
    -----
    On the other end, I developed this code:
    SELECT TO_CHAR(SYSDATE,'dd')
    FROM DUAL
    WHERE TO_CHAR(SYSDATE,'dd') >= to_char(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')
    AND TO_CHAR(SYSDATE,'dd') < to_char(LAST_DAY(to_date(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')));
    Which returns a null value. :(

    Concerning

    Hello
    You want to retrieve whole days of the month last query... So here's...

    SELECT
    TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY') COMP_DATE,
    TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'DD') ONLY_DD,
    TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'MM') ONLY_MM,
    TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'YY') ONLY_YY
    FROM DUAL
    CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),'DD'))
    

    I'm not at the machine database so not tested.

    But one thing do not forget that this forum only for reports, it is a separate SQL and pl/sql instance.
    Function to retrieve all the days of the previous month.

    -Clément

    Published by: Graham on April 22, 2010 22:53
    Spelling error

  • Variable repository for the last month

    Hi gurus,

    I have a requirement to create a repository for the last month variable first day. We have no dimension of the day.

    i, e I should get 1 day last month.

    example: today is 29/07/2009 the variable repository should give me on 01/06/2009.
    If I am on 08/01/2009 the repository variable should give me 01/07/2009.

    Thanks adavance.

    Hello

    There are several ways to find it,
    The following query in the initialization block gives you the result want.

    Select last_day (add_months (sysdate-2)) + 1 double

    Concerning
    Kishore Guggilla

  • How to open search results in the same window in Firefox always done before the last update 22

    Before the last update, on that I would do a search let say Google and when I found what I wanted and clicked on, that the window would turn to the result in this window, now it opens a new window. Another question is I noticed when I have gmail open in a window and open another window that result is displayed, and then switches to the original which was open, modified window and the new window is reduced in the bottom taskbar, and I come back to open it again. Whether measures should be taken, please list them.

    Hi years.1, Flash is used by many sites to play videos and audio. It is also used by some sites for menu or the overall presentation systems. Some sites also use Flash to downloaders of files.

    Firefox in general will let you know if a site needs a plugin to display all of the content, but you may also see a message on the site. These messages are not always specific to Flash, but can sometimes say that JavaScript is disabled or else referring to the problem.

  • For the last month or more, I had the same two updates for my computer

    original title: Windows updates

    For the last month or more, I had the same two updates on my computer.  Is anyone know why and what I can do to fix this?  I am running Windows XP.  Thank you very much.

    Hello

    the message "you have hidden the important updates" is normal, because you have hidden the high priority updates, but the updates are already installed, if that's OK.

    Try to look again at the web page:

    http://www.update.Microsoft.com/

    and click on "Custom".

    You should not see the updates (KB2518864 and KB2539631) in "review and install updates.

    You should see only "Important - you have hidden the important updates..." and "high-priority - updates non-priority updates to update for your computer... ».

    Then, try this (remove the content of the "'C:\Windows\SoftwareDistribution" ")

    1. Click Start, click run, type services.mscand click OK.
    2. In the Services (Local) pane, click automatic updates, and then click stop.
    3. Reduce the Services (local) window.
    4. Select all the contents of the Windows distribution folder, and then delete them.

      Note By default, the Windows distribution folder is located in the drive: \Windows\SoftwareDistribution folder. This place is a placeholder for the drive where Windows is installed.

    5. Ensure that Windows distribution folder is emptyand enlarge the Services (local) window.
    6. In the Services (Local) pane, click automatic updates, and then click Start.
    7. Restart the computer.

    I hope that we will achieve the goal, it will no longer still report the updates :-)

    LC

  • Select before the last character.

    I have some URLS in a picture like this

    http://test.com/ABC/ghgh.html

    http://test.com/BCD/

    http://test.com/FFF/default.aspx

    http:// test2.com/a

    I want to select all the items before the last.

    But if the last / is it after the .com can get just how it is.

    so before should translate into

    http://test.com/ABC

    http://test.com/BCD

    http://test.com/FFF

    http:// test2.com/a

    create table soqs2)

    URL varchar2 (50)

    );

    insert into soqs2 values ('http://test.com/abc/ghgh.html');

    insert into soqs2 values ('http://test.com/bcd/');

    insert into soqs2 values ('http://test.com/fff/default.aspx');

    insert into soqs2 values ('http:// test2.com/a "");

    SQL and PL/SQL are the same forum...

    Check my last response to your original thread select prior to last character /

  • In the last months, I started to receive messages pop up when editing pdf files. One is "cannot complete this action because the"filename. " PDF-Adobe Acrobat Pro"program is not responding. "Choose" switch to "and correct the problem. O

    In the last months, I started to receive messages pop up when editing pdf files. One is "cannot complete this action because the"filename. " PDF-Adobe Acrobat Pro"program is not responding. "Choose" switch to "and correct the problem. The other is "content preparation courses. "Please wait while the document is being prepared for" and displays a progress bar. One last question, I noticed it is adobe hangs quite frequently and shows "not responding". I had Adobe Acrobat X Pro for several years, and these have not always taken place only months. I ' n not Adobe expert so I don't know why this is happening. I checked the updates. Any advice on what is happening?

    Hi jeffm7844011,

    Could if it you please let me know the version of the OS on your system?

    Please let me know this happens to you with all the PDF files that you try to change or with specific PDF files?

    Please see this KB document: https://helpx.adobe.com/acrobat/kb/message-content-preparation-progress-opening.html and Windows resolve system errors, freezes | Adobe software .

    Also please try to repair the installation by navigating to the help > repair installation.

    Let me know if it helps.

    Concerning
    Sarojini

  • How to find the value dated the same day in the last year

    I want to know how to find the value dated the same day in the last year.

    I use now, there is the function with the year and the result is

    Year Rev There are Rev
    20113000
    201240003000
    201320004000
    201450002000

    It works but it's not that I want. I'm trying to add the column date (Ex.20140101) in my report but it'snot work.

    I want to show:

    Date Rev There are Rev
    20110112200
    20120112100200
    20130112300100
    20140112500300

    If use (< degree >, < time_dim >. < date >, 365), it works but does not correct 100%

    Please help me...

    Thank you very much

    Check this link cool - bi.com

Maybe you are looking for