Select SQL - last day of the month, a year from now

Hello
How do we get the last day of the month, a year from now.

For example-sysdate-12/2/2009
Result - 31/12/2009

Thank you

Hello

SELECT  LAST_DAY ( ADD_MONTHS ( SYSDATE
                              , 12
            )           )
FROM    dual;

Remember, all DATEs, including the results of this query, include the hours minutes and seconds.
The hours, the minutes and the seconds returned by the above expression are the same as SYSDATE: If you run it at 15:43:30 today, it returns 15:43:30 on December 31, 2010. This can be important if you want to use an expression like this as the cut-off point in a WHERE clause.

Tags: Database

Similar Questions

  • BEEP Scheduler - last day of the month

    Is there a a way to schedule reports to run on the last day of the month using the Scheduler of BEEP? I see that I can choose to run the monthly report and I choose the day to run it, but the last day of the month is different from one month to the other most of the time. Is it possible to do so in the Scheduler?

    Thank you!

    Oops, my bad,
    I did not review the request clearly.

    There is possibility to plan the report, because every month and he asks date of the month.
    If you register 31, his is not going to run it for each month, since used 31 are present in every month.

    Note: And there is no provision in the bi-editeur before you do :), front-end Bi Publisher accuses this support.
    You can use WebService at fire report every end of month :), but if you seek support front end 'calendar' homepage, start SR.

    As far as I know, its a bug, please contact technical support and connect a SR and let me know of the State.

  • Get the last day of the month

    Hello

    How can I get the (day number of the) last day of a given month and year?

    So, if

    year 2015 = and month = 1, the output should be 31

    year = 2012 and month = 2 while production is expected to be 29

    year 2013 = and month = 2 while production is expected to be 28

    etc.

    Y at - it no OBIEE to achieve? If not, then a command SQL Oracle is very good too (I prefer OBIEE however)

    Thanks in advance,

    Erik

    You start from the first day of the month, you add 1 month [TIMESTAMPADD (SQL_TSI_MONTH, 1, 'your date')], you must subtract 1 day [TIMESTAMPADD (SQL_TSI_DAY,-1, 'your date')] and use the DAYOFMONTH function to get the number of the last day of the month [DAYOFMONTH ('your ' date')].

    All these calls nesting together and you're there.

  • Breaking a year in coming weeks of beginning and end Dates (parameters) and first and last day of the month

    Hello people:

    I have currently a query that picks up all the weeks between a date range where my week starts on Thursday and ends on Wednesday. The following query works fine except that I need the week of beginning and end, from beginning and end Dates of months and the beginning and the Dates of end of the values of the settings, I'm passing. In this case, I chose January 1, 2013 to 31 December 2013.

    Any help or pointers would be great!

    Thank you!

    Problem: I am picking up days of December 2012 as the first week began on December 27, 2012. In addition, in December, I'm pretty much lost last week as well (26 December - 31 December).

    The request in hand:

    SELECT first_thursday + (7 * (LEVEL - 1))   AS week_start_date,
                     first_thursday + (7 * LEVEL) - 1    AS  week_end_date
    FROM
    (
      SELECT TRUNC(p_from_date + 4, 'IW') - 4   AS first_thursday, -- Week should start the pre ceeding THURSDAY based on the Start Date
                      TRUNC( p_to_date + 4,  'IW') - 5     AS last_wednesday
      FROM
      (
        SELECT to_date('01-JAN-2013') AS p_from_date,
                        NVL(to_date('31-DEC-2013'), SYSDATE) AS p_to_date
        FROM     dual
      ) parms
    ) end_points
    CONNECT BY LEVEL <= ( last_wednesday + 1 - first_thursday)/7;
    

    Currently, this is the result I get (I'm only including the months of January and December here).

    Week_Start_Date     Week_End_Date
    27-DEC-12                02-JAN-13
    03-JAN-13                 09-JAN-13
    10-JAN-13                 16-JAN-13
    17-JAN-13                 23-JAN-13
    24-JAN-13                 30-JAN-13
    31-JAN-13                 06-FEB-13
    

    December:

    28-NOV-13               04-DEC-13
    05-DEC-13              11-DEC-13
    12-DEC-13              18-DEC-13
    19-DEC-13              25-DEC-13
    

    What I would really like is based on start and end Dates, as well as the first and the last day of the month is similarly try nicely. I have provided and then gently break at the end of the month:

    January:

    01-JAN-13              02-JAN-13
    03-JAN-13              09-JAN-13
    10-JAN-13             16-JAN-13
    17-JAN-13             23-JAN-13
    24-JAN-13             30-JAN-13
    31-JAN-13             31-JAN-13
    

    February:

    01-FEB-13    06-FEB-13
    07-FEB-13    13-FEB-13
    14-FEB-13    20-FEB-13
    21-FEB-13    27-FEB-13
    28-FEB-13    28-FEB-13
    

    November:

    31-OCT-13    06-NOV-13
    07-NOV-13    13-NOV-13
    14-NOV-13    20-NOV-13
    21-NOV-13    27-NOV-13
    28-NOV-13    04-DEC-13
    

    December:

    01-DEC-13           04-DEC-13
    05-DEC-13           11-DEC-13
    12-DEC-13          18-DEC-13
    19-DEC-13          25-DEC-13
    26-DEC-13          31-DEC-13
    

    Hello

    Roxyrollers wrote:

    Hello people:

    I have currently a query that picks up all the weeks between a date range where my week starts on Thursday and ends on Wednesday. The following query works fine except that I need the week of beginning and end, from beginning and end Dates of months and the beginning and the Dates of end of the values of the settings, I'm passing. In this case, I chose January 1, 2013 to 31 December 2013.

    Any help or pointers would be great!

    Thank you!

    Problem: I am picking up days of December 2012 as the first week began on December 27, 2012. In addition, in December, I'm pretty much lost last week as well (26 December - 31 December).

    The request in hand:

    1. First_thursday SELECT + (7 * (LEVEL - 1)) AS week_start_date,
    2. first_thursday + (7 * LEVEL)-1 AS week_end_date
    3. Of
    4. (
    5. SELECT TRUNC (p_from_date + 4, 'IW') - 4 AS first_thursday,-week should start to perform the pre-mounted THURSDAY based on the Start Date
    6. TRUNC (p_to_date + 4, 'IW') - 5 AS last_wednesday
    7. Of
    8. (
    9. SELECT to_date('01-JAN-2013') AS p_from_date,
    10. NVL (to_date('31-Dec-2013'), SYSDATE) AS p_to_date
    11. OF the double
    12. ) parms
    13. ) end_points
    14. CONNECT BY LEVEL<= (="" last_wednesday="" +="" 1="" -="">

    Currently, this is the result I get (I'm only including the months of January and December here).

    1. Week_Start_Date Week_End_Date
    2. DECEMBER 27, 12 2 JANUARY 13
    3. JANUARY 3, 13 JANUARY 9, 13
    4. 10 JANUARY 13 JANUARY 16, 13
    5. 17 JANUARY 13 23 JANUARY 13
    6. 24 JANUARY 13 30 JANUARY 13
    7. 31 JANUARY 13 FEBRUARY 6, 13

    December:

    1. NOVEMBER 28, 13 4 DECEMBER 13
    2. 5 DECEMBER 13 DECEMBER 11, 13
    3. 12 DECEMBER 13 18 DECEMBER 13
    4. 19 DECEMBER 13 DECEMBER 25, 13

    What I would really like is based on start and end Dates, as well as the first and the last day of the month is similarly try nicely. I have provided and then gently break at the end of the month:

    January:

    1. JANUARY 1, 13 2 JANUARY 13
    2. JANUARY 3, 13 JANUARY 9, 13
    3. 10 JANUARY 13 JANUARY 16, 13
    4. 17 JANUARY 13 23 JANUARY 13
    5. 24 JANUARY 13 30 JANUARY 13
    6. 31 JANUARY 13 JANUARY 31, 13

    February:

    1. 1ST FEBRUARY 13 FEBRUARY 6, 13
    2. 7 FEBRUARY 13 FEBRUARY 13, 13
    3. 14 FEBRUARY 13 FEBRUARY 20, 13
    4. 21 FEBRUARY 13 FEBRUARY 27, 13
    5. 28 FEBRUARY 13 FEBRUARY 28, 13

    November:

    1. 31 OCTOBER 13 NOVEMBER 6, 13
    2. 7 NOVEMBER 13 NOVEMBER 13, 13
    3. 14 NOVEMBER 13 NOVEMBER 20, 13
    4. 21 NOVEMBER 13 NOVEMBER 27, 13
    5. NOVEMBER 28, 13 4 DECEMBER 13

    December:

    1. 1ST DECEMBER 13 DECEMBER 4, 13
    2. 5 DECEMBER 13 DECEMBER 11, 13
    3. 12 DECEMBER 13 18 DECEMBER 13
    4. 19 DECEMBER 13 DECEMBER 25, 13
    5. 26 DECEMBER 13 DECEMBER 31, 13

    Why the "weeks" in November, have all 7 days, while the "weeks" in the first or the last week in the other month usually have less?  (For example, February 28 is a 'week' alone.)

    The following works for the other months:

    WITH all_days AS

    (

    SELECT DATE "2013-01-01' + LEVEL - AS a_date 1

    OF the double

    CONNECT BY LEVEL<=>

    )

    SELECT DISTINCT

    More GRAND (TRUNC (a_date + 4, 'IW') - 4)

    , TRUNC (a_date, 'MONTH')

    ) AS week_begin

    , The LEAST (TRUNC (a_date + 4, 'IW') + 2

    TRUNC (LAST_DAY (a_date))

    ), Week_end

    Of all_days

    ORDER BY week_begin

    ;

    Output:

    WEEK_BEGIN WEEK_END

    ----------- -----------

    January 1, 2013 January 2, 2013

    January 3, 2013 January 9, 2013

    January 10, 2013 January 16, 2013

    January 17, 2013 January 23, 2013

    January 24, 2013 January 30, 2013

    January 31, 2013 January 31, 2013

    February 1, 2013 February 6, 2013

    February 7, 2013 February 13, 2013

    February 14, 2013 February 20, 2013

    February 21, 2013 February 27, 2013

    February 28, 2013 February 28, 2013

    ...

    November 1, 2013 November 6, 2013

    November 7, 2013 November 13, 2013

    November 14, 2013 November 20, 2013

    November 21, 2013 November 27, 2013

    November 28, 2013 November 30, 2013

    December 1, 2013 December 4, 2013

    December 5, 2013 December 11, 2013

    December 12, 2013 December 18, 2013

    December 19, 2013 December 25, 2013

    26 December 2013 31 December 2013

  • Last day of the month with the last minute of the day

    Hello
    I wonder about how to get the last day of the month with the last minute of this day(23:59). We can use the last_day function (DATE) to get the last date, but reminds me of the time of day when the function has been executed. But I want to have the last minute with my last date of the current month.

    Please inform.

    Thank you

    HP

    Hello

    Ora_bie wrote:
    Hello
    I wonder about how to get the last day of the month with the last minute of this day(23:59). We can use the last_day function (DATE) to get the last date, but reminds me of the time of day when the function has been executed. But I want to have the last minute with my last date of the current month.

    In fact, it returns at the same time as the argument you pass; But whatever it is, is not what you want.

    This will return the last day of the month that contains the DATE 23:59 (or 23:59) dt:

    SELECT  ADD_MONTHS ( TRUNC (dt, 'MONTH')
                 , 1
                 ) - (1 / (24 * 60))
    FROM    dual
    ;
    

    TRUNC (dt, 'MONTH') is 00:00 on the first day of the month that contains dt.
    ADD_MONTHS (TRUNC (dt, 'MONTH'), 1) is from 00:00 the first day of the month following the one containing dt.
    ADD_MONTHS (TRUNC (dt, 'MONTH'), 1)-(1 / (24 * 60)) is a minute earlier.
    (Since there are 24 hours, each with 60 minutes, every day, 1 / (24 * 60) days is identical to a minute.)

    Another (less clear, in my opinion) way to get the same results is:

    TRUNC (LAST_DAY (dt)) + (1439/1440)  -- 1440 minutes = 1 day
    
  • ORA-01847: day of the month must be between 1 and the last day of the month

    Hi all






    Select
    To_date(mDate||) e '|| mtime, "YYYY-MM-DD HH24MISS") meddate
    of PR_MOCTEST_TEMP

    mDate IS OF TYPE of DATA VARCHAR2 AND mtime OF VARCHAR2

    mDate: 07-09-2009
    mtime: 131241

    mDate IS IN FORMAT DD-MONTH-YYYY
    mtime: HHMMS

    mtimeOF IS OF TYPE of DATA VARCHAR2 AND VARCHAR2 mDate

    mDate: 07-09-2009
    mTIME: 131241

    mDATE IS IN FORMAT DD-MONTH-YYYY
    mTIME: HHMMS

    I NEED TO COMBINE THE 2 COLUMNS TO GET THE OUTPUT AS DD-MM-YYYY HH24MISS
    AND I AM GETTING THE ERROR;


    ORA-01847: day of the month must be between 1 and the last day of the month

    where mistaken?

    Please notify


    Kai

    You will find the bad dates using a table of logging of errors:

    --we'll try to insert into here, invalid dates will be thrown out
    create table dst(d date);
    
    -- create an error log table dst_err
    exec dbms_errlog.create_error_log('dst', 'dst_err');
    
    -- try the insert. Will fail with your ORA-01847
    insert into dst select TO_DATE(mdate||' '||mtime,'DD-MM-YYYY HH24MISS') from PR_MOCTEST_TEMP log errors into dst_err('comment'); 
    
    -- view the errors
    select * from dst_err;
    
  • Get the first and the last day of the month...

    Hi friends,

    I'm trying to get the first and last day of a month and wants to implement that in the following code:

    SELECT COALESCE (Date_A, Date_B, Date_C)
    OF the double

    Here Date A and B are in Format DD MM YYYY (March 14, 2008)
    and Date like MM YYYY (March 2008)

    How can I get the Date_C as of March 1, 2008, OR March 31, 2008 if Date A and B are NULL?

    Thank you!

    Published by: user11095386 on April 23, 2009 10:45

    Hello

    In my previous message, I thought that you were starting with strings like ' 03 12 2009"and you want to display in the form of" 12 March 2009'.» If what you have is just the opposite, then simply reverse strings format in my first message. Add a comma, if you want, in the format string.
    I think that's what you want:

    COALESCE ( TO_CHAR ( TO_DATE ( Date_A, 'fmMonth DD YYYY'), 'MM DD YYYY')
             , TO_CHAR ( TO_DATE ( Date_B, 'fmMonth DD YYYY'), 'MM DD YYYY')
             , TO_CHAR ( TO_DATE ( Date_C, 'fmMonth YYYY'),    'MM DD YYYY')
             )
    

    Notice how, on the 3rd line, TO_DATE is called without DD in the format string:

    TO_DATE ( Date_C, 'fmMonth YYYY')
    

    When you do so, by default the day the 1st of the month, so that's all you need to do to convert the VARCHAR2 'March 2009' at the DATE of March 1, 2009.

    If you would like the last day of the month, not the first, when Date_C is selected, then use LAST_DAY:

    COALESCE ( TO_CHAR ( TO_DATE ( Date_A, 'fmMonth DD YYYY'), 'MM DD YYYY')
             , TO_CHAR ( TO_DATE ( Date_B, 'fmMonth DD YYYY'), 'MM DD YYYY')
             , TO_CHAR ( LAST_DAY ( TO_DATE ( Date_C
                                              , 'fmMonth YYYY'
                                )
                         )
                 , 'MM DD YYYY'
                 )
             )
    
  • First day/last day of each month

    Hello
    y at - it sql/script to get the first day/last day of each month.new to bi do not know the syntax

    If a point on the link to get these things will be highly appreciated

    Hello
    I suggest that you go through the following link

    (1) http://oracle.ittoolbox.com/groups/technical-functional/oracle-bi-l/obiee-date-comparison-1726677#M1729534

    Toget first/last day of the month

    (2) http://www.obinotes.com/2010/02/tip-to-get-firstday-lastday.html

    New to OBIEE---> http://obiee101.blogspot.com/2009/07/obiee-how-to-get-started.html

    Thank you
    Saichand.V

  • First day of the month

    How to find the first day of the month if the month format is like TO_CHAR(SYSDATE,'YYYYMM')
    
    Sanjay
    Published by: user12957777 on May 23, 2012 21:12

    There is no 'day' in this date format.

    What you trying to do? What do you expect the result to look like?

    Are you wanting to set a date for the first day of the month and year of your example?

    SELECT TO_DATE(TO_CHAR(SYSDATE,'YYYYMM') || '01', 'YYYYMMDD') FROM DUAL;
    
  • 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}))))

  • How to get the last day of the weekend rather than a month

    Hi all

    Is the request appropriate and preferable to use to get the last business day of the month below?

    SELECT to_date('13.08.2014','dd.mm.yyyy') + MAX(RNUM) LastDay(nonweekend)
       FROM   (SELECT ROWNUM RNUM
              FROM   ALL_OBJECTS where rownum <=31)
      WHERE   ROWNUM <= 31 ANd
         TO_CHAR(to_date('13.08.2014','dd.mm.yyyy') + RNUM, 'DY','NLS_DATE_LANGUAGE=ENGLISH' ) NOT IN ('SAT' , 'SUN')
         and to_date('13.08.2014','dd.mm.yyyy') + RNUM <= last_day(to_date('13.08.2014','dd.mm.yyyy'))
    

    I have to use this motion for production.

    East - recommended to use?

    You can change your query this way:

    WITH t AS (SELECT trunc (to_date ('& calc_date', 'dd.mm.yyyy'), 'mm') + level - 1 calc_date)

    OF THE DOUBLE

    CONNECT BY LEVEL<= last_day(to_date('&calc_date',="" 'dd.mm.yyyy'))="" -="" trunc(to_date('&calc_date',="" 'dd.mm.yyyy'),="" 'mm')="" +="">

    )

    Select max (calc_date)

    t

    where to_char (calc_date, 'DY', 'NLS_DATE_LANGUAGE = ENGLISH') NOT IN ("SAT", "Sun");

  • How to get the last day of a month for every 2 months for a given period?

    Hello

    Can is it some please let me know how to get the last day, last day of the week, the weekend last day, last Monday, one month for every 2 months for a given period?

    Thanks in advance.

    Try the below

    SELECT LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))) lastday.

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'SAT '.

    SO LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-1

    WHERE TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'Sun '.

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-2

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    END as lastweekday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') IN ('Sam', 'SUN')

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    -(TO_NUMBER (TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))),' from)) - 1).

    END as lastweekendday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'MY

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER NEXT_DAY (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), "LUN")-7

    END AS lastmonday

    FROM (SELECT SYSDATE startdate,

    SYSDATE + 300 enddate

    THE DOUBLE)

    CONNECT BY LEVEL<=>

  • use to insert the last day of each month

    Hi, I wrote this code but it did not insert the 20 December and it is January 1, and next time running is 31 January... I would like to work to make this insert every last day of each month...
    begin
      sys.dbms_job.submit(job => :job,
                          what => 'INSERT INTO hisrtu 
                                            SELECT rtunum, linked, dbchkd, chaqty, dbvald, ctrltr, meaadj, qtyrtu, month, year, entity, rtunam 
                                            FROM qtyrtu;',
                          next_date => to_date('31-10-2010 01:00:03', 'dd-mm-yyyy hh24:mi:ss'),
                          interval => 'SYSDATE +30');
      commit;
    end;
    /
    I don't know if it's because I assigned the date 31-10... In November it's just but December has not...

    Best regards, hope you can help me.

    I use oracle 9i

    Hello

    If you want the job to run at 02:00 the last day of the next month, then the desired argument is:

    interval => 'ADD_MONTHS (TRUNC (SYSDATE, ''MONTH''), 2) - (22 / 24)'
    

    In other words, if she finishes running at 02:30 on 31 January, then
    TRUNC (SYSDATE, 'MONTH') will be at 00:00:00 January 1
    ADD_MONTHS (TRUNC (SYSDATE, 'MONTH'), 1) will be March 1st at 00:00:00
    ADD_MONTHS (TRUNC (SYSDATE, 'MONTH'), - 1) (22 / 24) will be 22 hours earlier, i.e. 02:00 on the last day of February.

    logandro wrote:
    I don't know if it's because I assigned the date 31-10... In November it's just but December has not...

    Do you mean this line?

    next_date-online to_date (October 31, 2010 01:00:03 ',' dd-mm-yyyy hh24:mi:ss'),

    I don't think that's a problem. The next_date specifies only when it work baptisms. I guess he ran on October 31; you said it was running well on 30 November, 30 days after that. Something has to happen after November 30.

    Note that the interval argument is relative when the task completes. If a task takes 30 minutes to run, then

    interval => 'SYSDATE +30'
    

    means that, if it turns to
    01:00:03 October 31, then it will run again about
    01:30:03 November 30, around
    02:00:03 on December 30.
    02:30:03 January 29 and so on. If your business does that for a few seconds, it won't matter much.

    If you decide to use LAST_DAY, don't forget not that the hours-minutes-seconds referring LAST_DAY are the same as those of his argument.

  • Select the first 20 days of the month for a given date

    Hi gurus,

    Please let me know to select the first 20 dates for a date supplied by using a parameter.

    For ex -.

    Suppose I provided a date by using a parameter - January 13, 2012

    The query should return me - 01-Jan-2012, January 2, 2012... January 20, 2012

    or if I get home on 23 March 2012

    The query should return me - 01-Mar-2012, March 2, 2012... 20 March 2012

    Thanks in advance.

    Hello

    Here's one way:

    VARIABLE  target_date     VARCHAR2 (11)
    EXEC     :target_date := '13-Jan-2012';
    
    SELECT      TO_DATE ( SUBSTR (:target_date, 4)
                , 'Mon-YYYY'
               ) + LEVEL - 1     AS a_date
    FROM     dual
    CONNECT BY     LEVEL     <= 20
    ;
    

    Note that this does not take account the part of: target_date that represents the day of the month. When you use TO_DATE without giving a date of the month, it defaults to the 1st of the month.

  • query for the first day of the month

    Hi all

    How to get the first day of the month in the sql query.

    SQL> select trunc(sysdate,'mm') first_day from dual;
    
    FIRST_DAY
    ---------
    01-AUG-15
    
    SQL> select trunc(sysdate,'month') first_day  from dual;
    
    FIRST_DAY
    ---------
    01-AUG-15
    
    SQL> select trunc(sysdate,'mon')  first_day from dual;
    
    FIRST_DAY
    ---------
    01-AUG-15
    
    SQL>
    

Maybe you are looking for

  • Latest FF worm fails to ask where to download despite the selection tab ToolsOptionsGeneral ask

    Hi all:Read other solutions and they do not work on my laptop Win8Pro 64-bit. Seemed to have worked a few days ago. Is an update thru in the last 48 hours? As a reminder, under the ToolsOptionsGeneral I already selected (ticked) him always ask me whe

  • Satellite L500-21dts - Stop error code during the installation of Windows 7

    Hello I bought a laptop Satellite L500-21dts of Saudi Arabia. I lost the hd recovery during try windows 7 installation difficulty. If I try to install windows 7, I get the stop error message code 0x0000009c. If I turn sata to AHCI Windows xp sp2, sp3

  • Lenovo l220x flashes from time to time

    Hey Lenovo community I just bought l220x everything works well, BUT from time to time monitoring flashes. What should I do? thanx Note of the moderator; Please update your profile with your location country properly in accordance with the rules of th

  • Method to check the VISA resources is ready for writing.

    Dear Forum, I have a piece of equipment that I connect to LabView via serial. The companion of the Instrument is of course completely useless, which fails for inexplicable reasons, but everything works perfectly in hyperterminal. When I try to adapt

  • missing shelrestart.exeD:

    When I turn off my computer I get a message saying "Shelrestart.exe.DLL Initilazation failed. Now, when I log in, I have more down task bar icons on the right of the upper part of office and the computer takes about 4 minutes to start. Anyone know wh