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

Tags: Database

Similar Questions

  • How can I get a report containing data on the current month and the next month

    How can I get next month?
    I want a report that include data on the current month and next month.

    My solution is "Closing Date". "" Fiscal month "> = Valueof (NQ_SESSION. CURRENT_MONTH)
    S 'closing Date '. "" Fiscal month "< = MONTH (CURRENT_DATE + 30)

    But this show only the information between the current month and the date of the day + 30 days

    Does anyone have a better solution?

    You can meet the next email [email protected].

    Greetings!

    GON,

    Add the near field date in your report, add a filter and choose between. Place the cursor in the first box and select Add - SQL expression, paste into the first expression that I gave you. Repeat for the 2nd box and voila it will filter you need. If you are unsure, then use the superior / equal to the value for the first term and the lower than the 2nd.

    see you soon
    Alex

  • 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

  • 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="" -="">

  • How do I know the current month

    Hi Everibody,

    I need to know if there is a function o something in Hyperion to calculate the current month.

    Thank you!!!

    Edited by: Dieguinho on 22/07/2010 13:36

    you mean current month is the current month?
    Then, we can automate the input of the variable current month using the batch program by choosing the date system.
    You can use the variable to calculate the data for the current month.

  • 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

  • You want to display the current month and previous month data in a single record on forms?

    Hello experts,

    I have this requirement:

    Table structure:

    Division of months value totalAmount

    01-apr-2013 1 10000

    May 1, 2013 1 20000

    01-apr-2013 2 30000

    May 1, 2013 2 50000

    I want to display in forms such as

    Form:

    Month: May 1, 2013

    Total difference of month Division total division prev_Month

    May 1, 2013 1 10000 April 1, 2013 1 20000 10000

    May 1, 2013 2 30000 April 1, 2013 2 50000 20000

    I use two procedure to fetch the records for the current month and the previous month.

    but it will cause a problem, if for some data division previous month do not arise.

    Please suggest me some query I can get with current and data month pre to unique record.

    Please help me.

    Thank you

    Yoann

    I DON'T KNOW BUT TRY...

    Select the month of x.mn, x.division, total x.totalAmount, y.mn prev_month, y.division, total y.totalAmount, (y.totalAmount - y.totalAmount) difference

    Of

    (select month mn, division, totalAmount value)

    from table_name

    where month = (select max (month)

    from table_name

    )

    ) x,.

    (select month mn, division, totalAmount value)

    from table_name

    where month = (select add_months (max (month),-1))

    from table_name

    )

    ) y

    where x.division = y.division

    /

    ALEXANDER SIMONNET

    DHAKA BANGLADESH

  • 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

  • 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.

  • 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

  • Return of records only for the current month

    Hello

    I have a query that returns records for the current week and I want to extend it for return records for the current month.

    When TRUNC (start_date) < NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, "Sat") + 1
    AND TRUNC (end_date) > NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, 'Sam')-7

    I have two date fields, the first is called 'Start_Date', the second is called 'End_Date '. I want the query to return all the records for the current month including those who may start before or end post the month as events can start in a month and end with another. Does anyone know how this is done in a "Clause where?



    Kind regards

    Steve Welch

    You probably want to

    where TRUNC (START_DATE) <= LAST_DAY(TRUNC(sysdate, 'MONTH'))
    AND TRUNC (END_DATE) >= TRUNC(sysdate, 'MONTH')
    
  • 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.

  • OBIEE percentage of the current months ended

    Hello

    How to calculate the percentage of the current month complete dynamically. For example, if the date is December 15, 2010, then it should appear. Percentage of completed this month IE 50% December 15, 2010. Please suggest me how to calculate dynamically...



    Thank you

    Add another column to your report. Click the fx button and paste the following text. It will give you the percentage of the day of the month by the number of days of the month:

    DAYOFMONTH (VALUEOF ("CURRENT_DATE")) / (DAYOFMONTH (TIMESTAMPADD (SQL_TSI_DAY-1, TIMESTAMPADD (SQL_TSI_MONTH, 1, TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE))) * 100.00))

  • Filter the current month!

    Hello Experts!

    I have two tables of facts (sales, reservations) and three dimensions (time, geography, product) in my diagram. I want to see the % change in the booking in the current month compared to last month. I have a column in the reservation called "% change", which calculates the percent of change in booking from last month. How can I filter the data for the month in progress at my table - time, a month in the form of text for example values. January 2010?

    I read some articles and OTN but have not found something useful in my case.

    Thank you!

    Hi Dan21,

    Set a dynamic variable repository in your RPD.

    Use the following SQL as source

    SELECT MONTH_YEAR INITCAP (TO_CHAR (SYSDATE, ' MONTH YYYY '))
    OF THE DOUBLE

    Having the variable repository update every day, in this way, it will automatically update the next month.

    Filter your report based on the variable repository, that you have created.

    Good luck and if you found this post useful, please reward points!

    Best regards

    -Joe

  • How to get the week of the current month

    Hi all
    Is it possible to find the week of the current month.

    Help, please...

    Hello...

    Use this feature to get the desired result.

    Hope it's okay...

    CEILING (DAYOFMONTH ("Time D0". "T00 calendar date") (/ 7.00) "

    Note: use 7.00 7 not only in the denominator*.

Maybe you are looking for

  • Flash and Dolphin

    I have the updated version 10... Flash is enabled in the settings but it still does not in the browser... Please help solve this it's so boring

  • How can I run an XControl wireless in/out?

    Hello! I just developed some XControls. I want these XControls runs automatically without him wire an entry/ooutput. I tried to do, but the XControl runs only once and then never again. I think that it is possible to do because the XControl/out is no

  • Windows 7 SP1 OEM - transfer from a dead PC?

    I have the license of Windows 7 Home Premium SP1 OEM that was used in the computer that is now dead. I'm not using this computer more and build a new. Can I use the Windows 7 Home Premium SP1 OEM on my new computer? Thanks for all the replies...

  • SQL Server 2012 SP 3

    I recently installed the Service Pack 3 to SQL Server on a virtual server in windows 2008 R2 Datacenter When I look in Control Panel, it shows that installed, however when I check the versions of SQL Server Mgmt Studio it is still 11.0.3000.0 Ideas/t

  • Flash CC - stop animation looping

    Hellotry to stop my animation in a loop. using Flash CC and export as swf flash player 9 for a google ad.On the last image on a new layer, I have inserted a new image, added an action script.  The script has:Stop();That's all.  but when I test the mo