Max date data between the input date range.

Hi
I need to get the maximum date data's with in the date range.
Ex: this is sample date but , total records in DB around 2000.
NAME DATE Product1 Product2
aaaa 01/05/2011 5 5
aaaa 03/05/2011 3 3
bbbb 04/05/2011 6 6
bbbb 07/05/2011 2 2
aaaa 06/05/2011 1 1
case :1) If the user input date is 01/05/2011 to 05/05/2011
then the result should be
aaaa 3 3
bbbb 6 6
case :2) If the user input date is 01/05/2011 to 10/05/2011
then the result should be
aaaa 1 1
bbbb 2 2
so my result is purely based on max date between the input date range.
how to achieve the result

Dhiva wrote:
Hi
I need to get the maximum date data's with in the date range.
Ex: this is sample date but , total records in DB around 2000.
NAME DATE Product1 Product2
aaaa 01/05/2011 5 5
aaaa 03/05/2011 3 3
bbbb 04/05/2011 6 6
bbbb 07/05/2011 2 2
aaaa 06/05/2011 1 1
case :1) If the user input date is 01/05/2011 to 05/05/2011Jan 05 to May 05
or
May 01 to May 05
what date is 07/08/09?

Similar Messages

  • I don' Know the input/output range for my AT-MIO-16L-9 card.

    I did'nt have any problem, but sudenly my computer does not recognize my device. When I run the Ni-Daq recognition utility I don't Know what to put into the input/output range, I also have Windows NT 4.0

    nhhnh,
    First, reverify the proper installation by going to: http://www.ni.com/support/install/.
    For information on the input and output ranges, you can find this information in the User Manual: http://www.ni.com/pdf/manuals/320476.pdf.
    Have a great day!

  • Selection screen  -  i want to block the input in range-high  but i get '0'

    i have selection screen :
    SL_MONAT   FOR BKPF-MONAT NO-EXTENSION ,
    i want to block the high value input  , so i use  :
      LOOP AT SCREEN.
      IF SCREEN-NAME = 'SL_MONAT-HIGH'.
      screen-input = '0'.
    endif.
      endloop .
      When the screen display, the field is block but there is value '0' (zero) in the field.
    why?
      i just want to block the high option (by condition)  , with out any value inside  .
      when I delete the u201C loop at screenu201D  , no value display inside  .

    REPORT  ZSRK_073                                .
    TABLES : BKPF.
    SELECT-OPTIONS : SL_MONAT FOR BKPF-MONAT NO-EXTENSION .
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME CS 'SL_MONAT-HIGH'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.

  • Two Date Characteristics As An OR Condition For Date Range Input

    Hello,
    Here's the requirement.  The user inputs a date range.  In the query, we have two date characteristics.  If at least one of the date characteristics falls between the inputted date range, then the row should show up on the report.  This is essentially an OR condition.  How can this be done?
    Thanks!

    hi,
    just a tought... but worth a try.
    1) Create an 2 Formula variables with User Exit.(ZF1 & ZF2)
    2) These will be filled with data with SETP2(User Exit) from the user Entry Variable. One variable will have from date & the next one will have to date.
    3) Then create 2 more Formula variables (ZR1 & ZR2) this time with replacement path for the 2 date you have and the create a global Key Figure with If Condition.
    CKF's:
    (( ( ZR1 >= ZF1) AND ( ZR1 <= ZF2 ) ) * (your vales)
    repeat the same for the ZR2 also.
    Regards, Siva

  • Restrict Query Data based on Date range and Users

    Hi All,
    I have a few web reports that I need do restrict data based on Users.
    In all the queries i have an infoobject 0CALDAY, and  a User Entry range variable on it. Because of performance issues  I need to restrict the range of dates a User can see. Typically most of users could go to a max date range of 1 month back. But some others would need the ability to see data for much bigger range of dates.
    Pls suggest how should i go about with this. Should I have to enforce this at Variable level(user exit).... but then i might have to maintain a table for the users.. Is there any other way of doing it.
    thanks
    Raj

    Any thoughts ?

  • How to STOP OS X from automatically changing between language input methods

    I want to know if there is a way in OS X Leopard to stop the system from automatically changing the language input method. I use English and Japanese on my computer, but this would apply to anyone using more than one input method.
    For example, when I click on a Japanese-language file, the system automatically changes input to Kotoeri (the Japanese-language input method). When I then click on an English-language file it usually, but not always, changes back to English input. But I almost never want to TYPE in Japanese. I just need to be able to read Japanese and to cut and paste from Japanese language files. It is very annoying when I start typing in an English-language file and find the input method has been changed to kotoeri without me realizing it—everything comes out in meaningless Japanese. When I want to type in Japanese, I want to manually change to the Japanese input system. That is, I want English to always be the default input method even if I am manipulating Japanese-language files.
    So, I’m wondering if there’s a way to set the computer so that it never AUTOMATICALLY switches between the input methods. I want to be able to switch only manually. In the old days of System 7, 8, and 9, there was a third-party control panel you could get that would do this (I think it was called Stay There!) and I don't remember this being a problem in Tiger or earlier versions of OS X. Is anyone aware of any way to do this in Leopard?
    Thank you!
    Colin

    Well, I do have it set that way, and I can look up there to see where I am, but in the work I do time is critical and I move back and forth between the two languages frequently. It is really a pain and a waste of time to have to look and make a change that should be unnecessary. The problem is not so much that I don't know where I am. It's that I don't want to ever have to think I MIGHT be in anything but English input unless I specifically want to be. In other words, I need to be able to forget about this problem even being a possibility.
    Message was edited by: Colin Talcroft

  • IMPOSSIBILITY TO IDENTIFY THE INPUT TAX ON ASSET PURCHASE FOR TAX RETURN

    We have only one input tax account 44560000 for all types of purchase. Monthly tax returns require a deduction between the input tax on asset purchase and input tax on another purchase.
    We are asking if the input tax on asset purchase (on internal order) must be posted in an account separately.

    Dear kmgomes ,
    Ideally system should not ask any transaction type for tax line. Please check which posting key is it using in simulation mode. Have you provided the transaction type (e.g. 100) when selecting posting key 70?
    You can alos check transaction OBYD where G/L account posting from asset posting must be set up with posting key 40 and 50.
    I understand you must be missing or trying to post incorrectly something in F-90, shall suggest to review the input in the transaction once again and check.
    Hope this helps!!!
    Regards,
    Murlidhar Khatri

  • How to use SQL to display Datethat falls between the date range

    Hi,
    I'm figuring out how do i use SQL to select data
    that falls between the date range stated
    (for eg. 19/02/1955 to 19/02/2003)
    I've tried :
    sql="Select * From StudentRecords WHERE DOB BETWEEN #" jTextField21.getText() "#" +" And " +"#" +jTextField22.getText;
    Using BETWEEN statment , but Between Statement isn't doing what i want..
    even those out of range are displayed... any ideas how??
    Thank yOU in advance!

    oracle:
    sql = "Select * From StudentRecords WHERE DOB between TO_DATE('07/04/2003','dd/mm/yyyy') and TO_DATE('08/04/2003','dd/mm/yyyy')";

  • How to count the days between Date Range using OO ABAP?

    hi experts,
            i want to count the days between Date Range using OO ABAP for that  which class and method  can i use?.
    Thanks,
    Mahesh.

    Not sure I understand the requirement for it to be OO, but you could always write your own (i.e. use this):
    REPORT zz_date_diff.
    CLASS date_diff DEFINITION.
      PUBLIC SECTION.
        METHODS diff IMPORTING     i_date_fm TYPE d
                                   i_date_to TYPE d
                     EXPORTING     e_days    TYPE i.
    ENDCLASS."
    CLASS date_diff IMPLEMENTATION.
      METHOD diff.
        e_days = i_date_to - i_date_fm.
      ENDMETHOD."
    ENDCLASS."
    DATA: g_ref TYPE REF TO date_diff,
          g_days  TYPE i,
          g_date_fm  TYPE d VALUE '20080101',
          g_date_to  TYPE d VALUE '20090101'.
    START-OF-SELECTION.
      CREATE OBJECT g_ref.
      CALL METHOD g_ref->diff
        EXPORTING
          i_date_fm = g_date_fm
          i_date_to = g_date_to
        IMPORTING
          e_days    = g_days.
      WRITE g_days.

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all,
    1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX?
    MEMBER [Measures].[Q1 act.period to date sales] AS
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,[Measures].[Sales amount]
    This is the measure I have, I need to add the max date is W20. 
    2)Also, when I calculate the sales between [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[40] and the currentmember, for example being [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[20],
    he calculated the sales between this period. However, in theory this is not possible because W20 < 40. Is there any way I can put a constraint on this that he only calculates the sales if the currentmember is > the start period?
    Thanks in advance!

    Y, you can put a check on to determine if currentmember > start period.
    Firstly, your period keys are composite of year and period (indicated by the two ampersands in the fully qualified date above). If your period keys were non-composite (eg 201501) it would be a simple matter of 
    IIF([Date invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null)
    There are advantages of having two period attributes on the dimension, one with a fully unique
    key and the other with just the period of fy, but that's digressing.
    With your composite keys, you could use a calc like the following for the SUM()
    Sum(
    [Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1]
    [Date invoice].[Bonus calendar - Week].Currentmember
    *[CurrentSalesPeriod]
    ,IIF([Date
    invoice].[Bonus calendar - Week].Currentmember.parent.properties("key") +[Date
    invoice].[Bonus calendar - Week].Currentmember.properties("key") > [Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].parent.properties("key")+[Date
    invoice].[Bonus calendar - Week].[Bonus week of year].&[2015]&[1].properties("key"),[Measures].[Sales
    amount],null))
    Richard

  • Reports / intranet/ In some detail,  the user will input a date range from and 2 and will out put the records in the int

    Hello there,
    I am totally green in web development.
    my goal is to, for the user will input a date range from and
    to and will out put the records in the intranet when they press a
    button.
    However, the good news is: I have experience in programming.
    I have written applications for desktop in VB>NET and I
    understand RDBMS /sql concepts .
    But CF and WEB development is new to me.
    My current projects involves in connecting to DB and testing
    it. (it works fine)
    And outputting reports by to a intranet page. (records)
    i need help on how to start this asap. I will even do some
    practice at home.
    Tools I have at work
    • Development server(test)
    • Home site.
    • Toad for db connection.
    • Html reference guide
    • Cf dummies book.
    How can start my projects.
    (ex. Create cf, outputpage?)
    seriously, I am new to this.
    Thanks.

    Well, I had a really nice response with some concepts and
    ideas for you to practise on etc, but these dumb forums timed out
    and I lost it all
    If you want to pop me an email we could probably do a few
    exercises together that way - or even by MSN Messenger if you want.

  • Need JavaScript for Sharepoint Designer 2010, to show a Pop-up to all the users between date range and the redirect the site

    Dear all,
    I am very new to Sharepoint designer 2010. Its better to say, i am just stepping in.
    I have sharepoint site which is accessible for all the users to update few information. But i want this site not to be accessible during a date range, say from 15th to 20th of every month.
    I am planning to have something like this: If any user tries to access this sharepoint site between 15th to 20th date range of everymonth, then the browser must show an pop-up alert saying "This site is not accessible during this date range" and Redirect
    this sharepoint site to someother site (Say http:// somesitename.xx.com) immidiately.
    I know very little about how to add Javascript in sharepoint webpart.
    Please provide the Javascript or any best alternate solution to my concern.
    Thanks in advance.

    Hi,
    From your description, my understanding is that you want to redirect sharepoint site to another site between 15th and 20th every month.
    I agree with what Sudip says. If you still want to use JS code,You could try these steps
    below:
    Open your site with SharePoint Designer.
    Click Master Pages in left navigation.
    Find file v4.master, and backup it(it is very important).
    Right click your v4.master,
    choose "Edit File in Adavance Mode".
    Add the code below into the <head/> tag.
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script
    type="text/javascript">
    $(document).ready(function(){
    var today = new Date();  
    var day = today.getDate(); // get current day
    var id = _spPageContextInfo.userid; // get the id of current logon in user
    var boolFlg = false;
    $.ajax({
       url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteGroups/GetByName(\'"+"sharepoint Owners"+"\')/Users", //get users in a specified group can access the sharepoint site from 15th to 20th every
    month
       type: "GET",
       headers: {"accept": "application/json;odata=verbose"},
       success: function (data) {
          if (data.d.results) { 
             var src = data.d.results;
             for(var i = 0; i < src.length; i++){
                if(src[i].userid==id){ //check the logon in user in  the specified group or not
                   boolFlg = false;
                   break;
             if(!boolFlg){
                if(day <= 20 && day >=15){
                    alert("This site is not accessible during this date range"); // alert the message
                    location.href = "http:// somesitename.xx.com"; // redirect to another site
       error: function (xhr) {
          alert(xhr.status + ': ' + xhr.statusText);
    })</script>
    Best Regards
    Vincent Han
    TechNet Community Support

  • Extracting a count of distinct values between two date ranges over months

    Hi All,
    I am having a bit of difficulty in figuring out the query to build a list of active campaigns over a date range.
    i.e. I have a table with campaign IDs and their start and end date details like this
    Campaign_id     Start_date     End_date
            10001     1-Jun-09     31-May-11
            10002     1-Jun-09     23-Jun-11
            30041     21-Aug-09     31-Dec-09
            20005     3-Jun-10     31-May-11
            90021     21-Nov-09     30-Nov-10
            54000     1-Jun-11     1-Dec-12
            35600     1-Mar-10     31-Mar-12 What the above data means is, for eg. the campaign 10001 is active from 1-Jun-09 to 31-May-11 i.e. for 24 months (inclusive of the month Jun-09 and May-11)
    What I need to figure out is the counts of active campaigns between a date range and display that active count at a month level (for e.g. lets say we want to see all the campaigns that were active
    between the date range '01-JUN-2007' and '30-APR-2012' ). So the partial output would be as seen below. The list would continue till december-2012
    Month    Year    Count of active campaigns
    Jan    2009    0
    Feb    2009    0
    Mar    2009    0
    Apr    2009    0
    May    2009    0
    Jun    2009    2
    Jul    2009    2
    Aug    2009    3
    Sep    2009    3
    Oct    2009    3
    Nov    2009    4
    Dec    2009    4
    Jan    2010    3
    Feb    2010    3
    Mar    2010    4
    Apr    2010    4
    Dec    2012    1 Could anybody please help me with the right query for this.
    Thanks a lot for help
    Regards
    Goldi

    set pagesize 40
    with tab as
                    select 1 id, sysdate -100 start_date, sysdate end_date from dual
                    union
                    select 1 id, sysdate -200 start_date, sysdate -150 end_date from dual
                    union
                    select 1 id, sysdate -600 start_date, sysdate - 400 end_date from dual
                    union
                    select 1 id, sysdate -300 start_date, sysdate - 150 end_date from dual
                    union
                    select 2 id, sysdate -100 start_date, sysdate-50 end_date from dual
          year_tab as
                        select
                                 add_months(min_date, level -1) m
                        from
                                select min(trunc(start_date,'YYYY')) min_date, add_months(max(trunc(end_date,'YYYY')), 12) max_date
                                from tab
                        connect by level <= months_between(max_date, min_date)
    select to_char(m,'YYYY') year_,
             to_char(m,'Month') month_,
             nvl(act, 0) act
    from   year_tab,
                select m date_,count(*)  act
                from tab, year_tab
                where m between trunc(start_date,'MM') and trunc(end_date,'MM')
                group by m
                ) month_tab
    where m = date_(+)
    order by m;
    YEAR_ MONTH_           ACT
    2010  January            0
    2010  February           0
    2010  March              0
    2010  April              0
    2010  May                0
    2010  June               0
    2010  July               0
    2010  August             0
    2010  September          1
    2010  October            1
    2010  November           1
    2010  December           1
    2011  January            1
    2011  February           1
    2011  March              1
    2011  April              0
    2011  May                0
    2011  June               0
    2011  July               1
    2011  August             1
    2011  September          1
    2011  October            2
    2011  November           2
    2011  December           2
    2012  January            2
    2012  February           2
    2012  March              2
    2012  April              1
    2012  May                1
    2012  June               0
    2012  July               0
    2012  August             0
    2012  September          0
    2012  October            0
    2012  November           0
    2012  December           0
    36 rows selected.

  • Crystal XI Graph floating bar problem-needs to be like a gantt w/o the date range

    Post Author: mecca
    CA Forum: Charts and Graphs
    Here is my problem I have a min and max range of numbers(not a date)I need plotted along with a value in between the min and max date. All this data, the 3 fields come from sql 2005/vb.net 2005. So, the data is set. I tried a line chart and i got 3 squares with no line, I have the chart under a group on my report. I tried a bar chart but I don't want the graph line to start at the edge of the graph. I tried to stack the bar and then set the min and max colors to white so that I would only see the value line but that did not work either. I have an example of what it should look like but can't upload it.
    so my min is 1.5 max is 5.6 and actual num is 4 I hope this crude example helps.
                xxxxxxxxxxxxxxxxxxxXxxxxxxx
    0                   2                       4                   6                 8   

    Post Author: V361
    CA Forum: Charts and Graphs
    I was able to use a Gantt, then right clicked the dates and selected data (Y) axis options, and clicked on the show axis labels.   Not sure if this will work for you or not.  I ignored the errors about "Gantt charts require 'For each record' and 2 date fields under 'Show Value(s)" If that doesn't help, there may be another way to resolve the issue.

  • Oracle 10g - Problem with Date Ranges using Between

    I am keeping track of patients who have not been contacted during a date range. if a nurse adds an event or note and the note is type 1,3,4 then this is a contact. The following works but if the event or note was made on the same day as the report is run, the current contact is not printed. Any help to improve the query and identify the problem would be appreciated. Also, if you add '1' to' n.created_date_time BETWEEN '10-Jan-2010' AND TRUNC(SYSDATE)' so it is ' n.created_date_time BETWEEN '10-Jan-2010' AND TRUNC(SYSDATE) + 1'. It works. What is wrong?
    SELECT upper(symptom_text),
      COUNT(UNIQUE(c.patient_id)) ,
      COUNT(UNIQUE(
      CASE
        WHEN e.eventdate BETWEEN '10-Jan-2010' AND TRUNC(SYSDATE)
        OR (n.created_date_time BETWEEN '10-Jan-2010' AND TRUNC(SYSDATE)
        AND n.note_type_id                                             IN (1,3,4))
        THEN c.patient_id
        ELSE 0
      END)) - 1
    FROM patient c,
      cust_info ci,
      event e,
      note n
    WHERE c.physician_id = 74
    AND c.patient_id      = ci.patient_id
    AND ci.info_type_id    = 32
    AND ci.symptom_text      IS NOT NULL
    AND c.patient_id      = e.patient_id(+)
    AND c.patient_id      = n.pk_id(+)
    AND n.table_name(+)    = 'patient'
    GROUP BY upper(symptom_text)
    ORDER BY DECODE(upper(symptom_text), 'A+', 1, 'A', 2, 'B', 3, 'C', 4, 'D', 5, 99)I suspect the end date is not inclusive. Fields are Date data types. Thanks for any help.

    Hi,
    achtung wrote:
    Understood. Frank was correct. Do you mean about the dates? Is that issue solved now?
    It would help a lot if you posted some sample data (CREATE TABLE and INSERT statements) and the results you want from that data. Simplify as much as possible. For example, if everything involving the e and n tables is working correctly, forget about them for now. Post a question that only invloves the c and ci tables.
    But, additionally, when a record in the cust_info doesn't exist my contact count is inaccurate. How can you explain this conceptually. I understand the query path is checking for this record due to the predicate. Perhaps the query should be redesigned. Thanks for your input!Again, you can see the results, and you know what they should be. Nobody else has that information. Please post some sample data and the results you want from that data.
    In your earlier message you said
    Could there be a problem if a record does not exist in the ci table?The condition:
    AND ci.symptom_text IS NOT NULL
    filters for this right? Maybe this could be part of the problem. why I'm not seeing records when a note is added to a patient's doc. How would this be technically be explained? You're doing a inner join between c and ci:
        AND c.patient_id      = ci.patient_id
        AND ci.info_type_id   = 32
        AND ci.symptom_text   IS NOT NULL ...Rows from c will be included only if there is a row in ci with the same patiend_id: even more, that matching row in ci must also have info_type_id=32 in a non-NULL symptom_text, otherwise, the row from c will be ignored.
    If you want rows from c to be included even if there is no matching row in ci, then do an outer join, like you're already doing with the e and n tables:
      WHERE c.physician_id = 74
        AND c.patient_id         = ci.patient_id (+)
        AND ci.info_type_id (+)  = 32
        AND ci.symptom_text (+)  IS NOT NULL
        AND c.patient_id         = e.patient_id(+)
        AND c.patient_id         = n.pk_id(+)
        AND n.table_name(+)      = 'patient'

Maybe you are looking for

  • OVM 2.2.2 import VirtualBox OVA

    [root@ovm]# cat /etc/ovs-release Oracle VM server release 2.2.2 Unpack OVA, [root@ovm]# file VB.ova VB.ova: POSIX tar archive [root@ovm]# tar tvf VB.ova -rw------- someone/someone 15691 2011-12-08 20:32:29 VB.ovf -rw------- someone/someone 2917182464

  • Low Battery warning went away?!

    HELP!! For some reason, my MacBookPro 17" stopped giving me low battery warnings. It always used to, but now it just shuts off without warning. I've read through the other discussions for tips and here is what I have done so far: I've re-calibrated t

  • I can not download photshop elements 13

    I can not download Photshop Elements 13.

  • How to add contact in my email contact list ini-pad mini ?

    How do I add contact in email contact list on my iPad mini ?

  • Unable to run Air or Install anew

    Machine:      mid-2010 macbook pro 15" OS:      Mac OSX v.10.7.2 (Lion) Tried to download Muse (1/17/2012)or run Air-based help (for Vectorworks) (earlier) would not work. (Adobe.com reported "Plugin-failed") Tried installing Air new, reports "will n