Check if a license exists for at least one day in each month

How to check if a license exists for at least one day in each month for a given period ? Example : If we have a review period from Jan 25 2009 to Aug 15 2009. How to check if there is license for at lease one day in every month.

Hi,
Welcome to the forum!
(1) construct a table or result set that has one row per month in the review period. [This thread|http://forums.oracle.com/forums/thread.jspa?messageID=3651350?] has a similar problem.
(2) outer-join your actual data to that result set
(3) use the aggreagate COUNT (x) function (where x is some column from your table) to see if there were any matches in each month. GROUP BY months.
For a more specific answser, ask a more specific question.
Post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
It never hurts to say what version of Oracle you're using.
Edited by: Frank Kulash on Jul 28, 2009 1:54 PM
Maybe something like:
WITH  all_months  AS
     SELECT     ADD_MONTHS ( TRUNC ( &period_begin_date
                            , 'MM'
                  , LEVEL - 1
                  )         AS month_date
     FROM    dual
     CONNECT BY  LEVEL <= 1 + CEIL ( MONTHS_BETWEEN ( &period_end_date
                                                      , &period_begin_date
SELECT       m.month_date
,       CASE  COUNT (l.license_date)
            WHEN  0  THEN  'Nothing this month'
                      ELSE  'Some licenses issued'
       END     AS summary_txt
FROM            all_months     m
LEFT OUTER JOIN     license_table     l     ON  m.month_date     = TRUNC (l.license_date, 'MM')
                                 AND l.license_date     BETWEEN  &period_begin_date
                                            AND      &period_end_date
GROUP BY  m.month_date
ORDER BY  m.month_date
;Untested

Similar Messages

  • Log data when signal is for at least one hour stable

    All, can you please help me out with the following;
    I have data to log when one signal is for at least one hour between two values. If this is the case, all the data can be kept. If this is not the case, let's say after 30min that one signal is out of spec, previous measured data in those 30min may not be displayed in the log file. Does somebody have a solution for this?
    Thanks in advance
    Solved!
    Go to Solution.

    So, it means, you want to log data if pressure is between 8 and 12 bar. Else, discard data and continue monitoring of data. Monitor only value
    Right?
    you can compare the pressure value using an In Range function and put a case structure to log data only when the value is in range. use timestamps to know when the data was in range. so the file only contains data when the pressure is in range
    Or, if you want to log data ONLY IF the presusre was between 8 and 12 bar AND for an hour or more, then, put a timer to check time elapsed since the last value change and then log if timer has counted an hour. Then instead of inrange, use a shift register to see the last value which changed and then turn on a timer. When the value changed next, update the shift register. when the timer is up, reset the timer and log data.
    I will take time to put these two logics on code and post. instead, you can make a code of either of the two options and post back. we can review your progress.  
    Almost forgot two questions: How are you reading the data? hardware used and data type? which file format do you plan to use?

  • REQUEST RUNNING FOR MORE THAN ONE DAY - HOW INVESTIGATE ABOUT THIS

    Hi Everyone ...
    As you know when you submit any request throigh concurrent manager . The request completed normal or give warning or error .
    My probelm I have request running for more than one day .but I don't know right tool how invetigate about this issue .
    I checked alert log and database lock but nothing wierd .
    We are using 11.5.10.2 with 10.2.0.4 DB .
    Thanks in advance ...
    Edited by: user12010537 on 26/09/2010 05:39 ص
    Edited by: user12010537 on 26/09/2010 05:46 ص

    Hi,
    schavali wrote:
    Use MOS Doc 735119.1 (How to Find Database Session & Process Associated with a Concurrent Program Which is Currently Running) to determine the PID of the concurrent request, then follow the steps identified in MOS Doc 1058210.6 (How to Enable SQL_TRACE for Another Session or in MTS Using Oradebug)
    enable tha trace
    Re: enable tha trace
    Thanks,
    Hussein

  • How to Create payment term for -Net Due 1st Day of Second Month Following

    Hi,
    We need to add a payment term for "Net Due 1st Day of Second Month Following Delivery". We need this to be in the system as soon as possible as we just were told of a change in terms for our client effective May 1st.
    Kindly advice me how to select the dates in OBB8?
    Thanks
    Supriya

    Hi Supriya,
    In OBB8, create a new payment term with the following settings -
    Default for baseline date = No default
    Payment terms/Term 1/Fixed date = 1
    Payment terms/Term 1/Additional months = 2
    This payment term will ask you for a baseline date on document entry. You can give the delivery date as the baseline date. If required, this date can be changed after posting the document also.
    Hope this helps.
    Regards,
    Mike

  • HT1688 I used a MC $50 Giftcard for the iTunes one day. It was supposed to update the games, and other apps on my phone. Only, it wouldn't go through, the credit card was declined. Still, I was charged 4 times. How do I get this back??

    To Whom It May Concern:
    I bought a Mastercard Giftcard for $50 the other day. It was only because the games needed updating before I could play them again, and my card on file had expired.
    I kept getting a message stating the the card was declined. Also, it kept telling me to try to put in another card, or different form of payment.
    I tried several times to get the MC to go through, and it didn't. It was not even showing that the card info even updated!
    When I went to check the amount of the giftcard, there were 4 pending charges of $10.89 on it.
    How do I get this money back? Please let me know as soon as possible.
    Sincerely,
    Queenie from Texas

    I did but that was from a month before, I want pics I took after that backup time. It deleted without my consent like this is not cool. I had recent pics from my trip.

  • How to save history for more than one day. Can't find the answer. Thanks, Bil

    When I click on the History tab in the tool bar it only shows History for one day or today. How can I change it to save History for 3 days?
    Thanks,

    See:
    *http://kb.mozillazine.org/Resetting_preferences
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • BOXI3.0: Formula for subtract/deduct one day or more from date field

    Greetings. Its Alias.
    I have one question. Actually I already post this question but at designer forum.
    I am using SQL.
    Example I have Order Date field and from this field I want to subtract the date by minus one day or two days or three days, etc.
    I got the solution for designer (example):
    DATEADD (dd , -3, EPJ_IPMS.dbo.DO_DATA.DO_DATE_D)
    But at webi level it does not work.
    I also do not understand why at designer and webi level may have different SQL select statement.
    Can someone help me please.
    Best regards,
    Alias

    Hi there Prashant.
    In my case here is I am using Microsoft SQL Server Enterprise Manager and the data is save inside it.
    The Designer and Webi are using same SQL database.
    I also created an Object at Designer and the result is good.
    But say if I don't want to create the object at Designer and let user create their own variables at webi.
    Meaning to educate user to put the variable and formula themselves.
    This is where the SQL statement a I mentioned earlier cannot be used at webi.
    Best Regards,
    Alias

  • User Exit Variable for Calculating number of days in a month

    I need a query to calulate the number of days in a particular month upto the current date. For example if i give 26 Feb it should reutrn 25, if i enter 30march it should return 29 for any specific year. I have gone through some posts and understood that i need to create a formula variable (under calculated KF's) and then go to CMOD, create a project, then enancement Assignment RSAP0001 then EXIT_SAPLRSAP_001 and include a code in INCLUDE ZXRSAU01. But i have any clue of coding. Could someone give me the entire code and how to connect it to the formula variable KF in created. The technical name of the key figure is ZMDAYS. If i have made any mistakes or if there is another eaier alternative please let me know. I thankyou all for the help.

    Hi Uday,
    I have a few modifications in the code
    Data: xdate type d,
          ip_year(4) type N,
          ip_month(2) type N.
    Types : Begin of ty_month_days,
           month(2) type N,
           days(2) type N,
           End of ty_month_days.
    Data : it_month_days type ty_month_days occurs 0 with header line.
    ip_year = 2006.
    ip_month = 01.
    do 12 times.
        CONCATENATE ip_year ip_month '01' INTO xdate.
        xdate = xdate + 33.       "this date is in the next month
        xdate+6(2) = '01'.        "first day of next month
        xdate = xdate - 1.        "last day of xmonth
        it_month_days-month = xdate+4(2).       "number of days of xmonth.
        it_month_days-days = xdate+6(2).
        append it_month_days.
        ip_month = ip_month + 1.
    enddo.
    This code stores Month and No. of days in the internal table it_month_days.
    You can access this internal table for your calculations
    This should help.
    Regards,
    Praveen.
    Message was edited by: praveen mathew

  • I'm using Firefox 5. Previous versions had a 'Remember visited pages for at least x days' under Tools--Options--Privacy--History. Where is this feature, or its equivalent, in Firefox 5?

    I have desktops and laptops, XP on some, Vista on others. Firefox 5 on all of them.

    The prefs browser.history_expire_days and browser.history_expire_days_min are removed in Firefox 4+ versions and replaced with a single places.history.enabled pref to remember history or disable the history.
    There is no time limit in Firefox 4+ versions for the history.<br />
    Firefox determines automatically how many pages can be kept without affecting the performance.
    You can see the current value via the pref places.history.expiration.transient_max_pages on the about:config page.
    See:
    * http://blog.bonardo.net/2010/01/20/places-got-async-expiration

  • TS3376 I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year one day it said no devices registered and stopped working why???

    I had my iphone set up to be tracked as registered with iCloud and it had been using it for a year today it said no devices registered and stopped working even though i tracked the selected iphone 4 device an hour earlier why did it do this???

    So basically the phone I was tracking was working an hour earlier it had no signal at times when it did pick up a signal it located it easily but an hour later the message came up no devices registered when my friend returned home I Checked the device I was tracking to make sure find my iphone was on but it was off and my friend didnt turn it off so my question is why did it turn itself off???
    Confused?

  • Expired Certificate for less than one day

    My reward certificate expired last night. I thought I had one more day. Can you help?

    Greetings blueskies2k, and welcome to the Best Buy forum!
    As bobberuchi alluded to, a certificate will expire after 60 days and cannot be reissued once having officially expired.  I would suggest changing your certificate preference from $5 (default) to $20, which should allow you to hang onto points for a longer period of time before a certificate is issued.  You may also want to try logging into your account more often.
    I would like to go over your My Best Buy account with you in greater detail to ensure it is up-to-date and to see if there are any other program related questions I can help answer, so I will be sending you a private message.  To check your private messages, you will want to login to the forum and click on the yellow envelope icon located at the top of the page.
    My Best Buy - FAQ
    I hope that you have a great day, and thank you for being a My Best Buy member.

  • How do i setup personal settings in firefox for more than one user? each one seperate from the other.

    I am accustomed to "accounts" for each family member which can be customized and organized (for example: favorite places) any way the person desires. Is such a feature available on Firefox?
    If so, how do I set it up?

    Firefox has a profile manager that allows you to create separate Firefox profiles for different users. Each has its own bookmarks, settings, and add-ons. You can check a box to have Firefox always display the profile manager when starting up, so you can choose which one to use. Sound useful? Check out this article: [https://support.mozilla.com/en-US/kb/Managing-profiles Managing profiles | How to | Firefox Help].
    Note: If you have Firefox start up to the profile manager, then when you click a link in another program it may not work unless you opened Firefox first.
    An alternate approach is to create individual desktop shortcuts pointed at each profile. This article shows the command line structure: [http://kb.mozillazine.org/Opening_a_new_instance_of_your_Mozilla_application_with_another_profile Opening a new instance of your Mozilla application with another profile - MozillaZine Knowledge Base].

  • What is the criteria for selecting a license if multiple licenses exist

    Hello experts,
    If multiple licenses exist for an order in GTS, what is the criteria to decide which license will finally be selected?
    The log says "Number of import/export licenses that could be affected: 3" but it finally picks up one.
    Does it do it sequentially using the internal license number?
    We have a scenario where we are upgarding from version 7 to version 10, and there is one license (say A) which was created in the older version and copied to the new system after upgrade. There is also a new license (say B) directly created in the new version (with same selection criteria as A)
    Now when an order is created, both licenses are "affected" but it picks up the license B created in the new version.
    If the system was picking license based on internal number it should have picked up license A which was created in earlier version (as that had a lower internal number sequentially). If I expire license B and recheck the order, then it correctly picks up A.
    So what is the actual criteria to select a license and in this case was License A not given priority because it was created in older version and then copied to new version as part of upgrade?

    As far as I can see from a quick look at the code, there is no attempt to place the determined licences in any particular order.  Since they are selected from table /SAPSLL/LCLIC, it seems reasonable that they would be selected according to field GUID_LCLIC.  Within one system, the GUIDs remain in order of creation date/time; however I don't know GUIDs are formed in relation to different systems.  My bet is that if you check in SE16, your "early" licence actually has a higher GUID value than the recent ones.
    Please check, and see if I'm right.
    Regards,
    Dave

  • Documentation Assistant - No Logical Component exists for this analysis

    Hi
    Whe trying to create a analysis with in solution manager documentation assistant i get the error messaage
    No logical component exists for this analysis , verify the analysis project.
    Can anyone tell me how i can solve this,
    Thanks
    Barry

    Hi Barry,
    To solve this issue, you may try steps described below:
    1. Call  Transaction 'SOLMAN_DIRECTORY'
    2. Select your source Solution via single click.
    3. In detail panel, check if there is any valid Logical component in the
    'System Group' Tab.
    4. Add related Logical Component to the Solution, make sure there is val
    id System for at least one role ( Development System e.g. )
    5. Save your Solution.
    6. Try to create Analysis Project from that Solution again and afterward
    screate an Analysis.
    Hope such information can help you solve such issue.
    Kind regards,
    Fabricius

  • License Key For SAP R/3 Enterprise Demo Version

    Hello Basis Gurus,
    I have installed SAP R/3 Enterprise Demo Version in my Notebook.
    When i am trying to login using User ID: SAPUSER getting an error message that ":Logon refused (valid license not installed)"
    SAP R/3 Details:
    Component Version: SAP R/3 Enterprise
    Installation Number: INITIAL
    License expiration: ..----
    Active Hardware Key: C1129820057
    System Number: System No. Empty
    When i am trying to install the License Key at Command Prompt getting the error message that
    Specify your license key:
    LICENSE_KEY   1...5....0....5....0...4
    LICENSE_KEY =
    Wrong license data specified
    >        Check the specified license data for:
    >        - typing errors
    >        - upper / lower characters
    >        - same values as noted on license fax
    How can i get the correct LICENSE_KEY for this demo version for the above hard ware key.
    Please advice urgently..

    to get hardware key:
    saplicense -get
    to get license key:
    https://websmp106.sap-ag.de/licensekeys

Maybe you are looking for

  • Two people using the same Mac for tutorials.

    I went through a tutorial with the writer of a program and he was walking me through the program while he was in his home city and state. I believe this 'sharing' was set up in our .Mac accounts. I do remember him telling me to get ready to accept a

  • I want .swf in InDesign to loop

    I created a slideshow in InDesign by placing each element on a different layer and then setting the timing and effects. There is no "Loop" setting when exporting a .swf from InDesign like there is in Illustrator. When the slideshow .swf was placed in

  • "admin" profile on 9216

    I have created a new user with network-admin role. Now can I delete the admin user. Intially the admin profile was messed-up. Using admin, able to login to Fabric Manager but not CLI. Pls. suggest.

  • Episodes from the same TV show are not grouped together

    Hello, I've a cousin from the states staying with me who has no forum membership so this question is from her. When viewing the iTunes TV Library on her MacBook, episodes from the same TV show [Journeyman] are not grouped together under the same albu

  • How to delete my balance from itune gift card.

    how can i delete itune balance from my account. i cant change my region.