Help for total count in a month

Hello everyone,I am reposting this message with the hope that I will get some help. Please help me I have a deadline to meet and maybe getting late in meeting the deadline.
Sometime back I had posted about the date function. I have that problem solved now my problem is that after finding all records which against each record I need to find the total count for that month if no records than I have to set it to a 0.
Here is how my program has been written.
PROCEDURE extract_materials
IS
CURSOR xyz
BEGIN
FOR xyz1 IN xyz LOOP
-- once inside the loop for each of the record from
the cursor I need to find a total count for that record for everymonth in the year.
All these records will be instered in to a staging table
Can you please help me out with this. I really appreciate this.
Thanks in advance

Take a look at analytic functions-- they should be just what the doctor ordered.
Justin

Similar Messages

  • Need help for array counting

    Any help for array question
    Hello to All:
    I want to tally or count some of the elements that I have in array but not sure how.
    I have for example: int myArray[] = {90,93,80,81,71,72,73,74};My objective is to tally all of the 90's, tally all of the 80's and tally all of the 70's.
    So, the result that I want to have would look something like the following:
    System.out.println ("The total tally number of 90's is " 2 );
    System.out.println ("The total tally number of 80's is " 2 );
    System.out.println ("The total tally number of 70's is " 4 );I do not want to add these numbers, just want to count them.
    Also I want to use a "forloop" to achieve the result intead of just declaring it at 2 or 4 etc..
    Any help Thankyou

    [u]First , This is not exactly what I have to
    do for homework. There is a lot more, a lot more
    involved with the program that I am working on.
    Second, this is an example, an example, an
    example of something that I need to achieve.
    Third, you are asking for a code, to me that
    sounds as if your asking for homework. Fourth,
    I did not ask for any rude comments. Fith, in
    the future please do not reply to my messages at ALL
    if you can not help!!!!
    Sixth, We did not ask for lazy goofs to post here.
    Seventh, In the future please do not post here. Take a hike - there's the virtual door.

  • Firewire Help For Total Lamebrain Needed

    I have an iMac that has been having problems and have purchased a Firewire HD. I transferred my information over to the external, but I don't think I've done it correctly. Someone suggested that my main operations program (I think that's what they called it) was not on the Firewire HD. I want to boot up from my Firewire for now until I can get the problem with the internal HD resolved. However I need to know how to put the system I need on the Firewire in order than I can boot up from there. I have been having to start up my computer using a "safe" boot because of kernal panics. I am in the process of straigtening that out, but I need to use the computer for a couple of hours using the Firewire. I hope this makes sense. As I mentioned I am a total lamebrain and if someone has the step by step way to do this and can help me out I will bake my next cake in your honour. Thank you in advance.
    iMac   Mac OS X (10.3.9)  

    You can do as suggested and user superduper (or carbon copy cloner) to replicate your internal drive to your external. If the issue you are having with your internal is software related, you might just end up moving the problem over to your firewire drive.
    You can always just use the install dvd and do a new system install onto you firewire drive. This way you will be sure not to move you problem over from the internal drive. If you do this, you need to format your firewire drive using disk utilities (in the application/utility directory). There is an option you need to select to allow the firewire drive to boot the system. It is the partition scheme called GUID.
    Either way you go (superduper or new system install), you need to format the firewire drive to the guid scheme.
    Hope this helps.
    Glor

  • Need help for total of Dr and Cr. in report painter

    Hello friends,
        I have created the trail balance in report painter. In table faglflext table. I created the common column of debit and credit cumulative balance and then separated the problem is I am not getting the
    total of all the debit and credit amount.
    Please help....

    solved

  • Need help for encoder count program !!!!!!!!!

    I am a new labview user.
    And i am trying to complete a project for my course.
    For a quick background on what I am working with, I am using a NI PCI-73566-Axis Stepper/Servo Motion Controller for PCI, NI UMI-7764 Series, NI USB-6009 and a IDEC SC1B Rotary Encoder.
    I am try to design a encoder count program and a new program to convert the encoder signal to RPM.
    But I just don't know where should I start? How can I get the same block diagram like P11 in the attach file?
    Please check more detail from the attach file.
    Attachments:
    P11.jpg ‏127 KB
    P8.jpg ‏149 KB
    P15.jpg ‏141 KB

    Hello,
    The two objects on the block diagram are DAQ Assistants and can be found under Functions»Measurement I/O»NI-DAQmx. From what I can gather, this is acquirign signals that you should have connected to the USB-6009.
    -Zach
    Certified LabVIEW Developer

  • Query Help for Running Count

    hi i have table with data like below
    CREATE TABLE Table1
    ID int
    ,GroupID int
    insert into Table1 values(1,1)
    insert into Table1 values(2,2)
    insert into Table1 values(3,2)
    insert into Table1 values(4,1)
    insert into Table1 values(5,1)
    insert into Table1 values(6,3)
    insert into Table1 values(7,3)
    insert into Table1 values(7,3)
    insert into Table1 values(8,2)
    insert into Table1 values(9,4)
    insert into Table1 values(10,5)
    Here i need the out put with GroupID and the count. The expected output like below
    GroupID
    Count
    1
    1
    2
    2
    1
    1
    3
    3
    2
    1
    4
    1
                 5              1  
    I think you got my scenario. For each groupID i need to put the count but with adjusents same GroupID

    Hi Akhil,
    It looks like your expected is wrong, Try the below:
    CREATE TABLE Table1
    ID int
    ,GroupID int
    insert into Table1 values(1,1)
    insert into Table1 values(2,2)
    insert into Table1 values(3,2)
    insert into Table1 values(4,1)
    insert into Table1 values(5,1)
    insert into Table1 values(6,3)
    insert into Table1 values(7,3)
    insert into Table1 values(7,3)
    insert into Table1 values(8,2)
    insert into Table1 values(9,4)
    insert into Table1 values(10,5)
    ;WITH FirstCte AS (
    SELECT GroupID,id,
    ROW_NUMBER() OVER(ORDER BY id) AS rnComplete,
    ROW_NUMBER() OVER(PARTITION BY GroupID ORDER BY id) AS rnGroupID
    FROM Table1)
    , SecondCte AS (
    SELECT id,GroupID, count(GroupID) Over(partition by GroupID, rnComplete - rnGroupID) as GroupCnt
    FROM FirstCte )
    SELECT m.GroupID, GroupCnt
    FROM SecondCte AS m
    GROUP BY m.GroupID, GroupCnt
    Order by MAX(m.ID)
    Drop table Table1
    GroupID
    Count
    1
    1
    2
    2
    1
    2
    3
    3
    2
    1
    4
    1
                 5              1 

  • Search help for month field

    Hi experts,
               Is there any possibility where we can get search help for month field . Search Help should provide month number and month name so that we can select that particular month in the screen field.

    Hi ,
    check  this search help  RSCALMONTH2   BW: Search Help for the Two-Digit Calendar Month
    if in Report  : you can use 
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_month.
    CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
    EXPORTING
    actual_month = sy-datum(6)
    IMPORTING
    selected_month = p_month
    regards
    Deepak.
    Edited by: Deepak Dhamat on Oct 20, 2011 10:44 AM

  • Help in finding the total count for each month

    Hello everyone,
    Sometime back I had posted about the date function. I have that problem solved now my problem is that after finding all records which against each record I need to find the total count for that month if no records than I have to set it to a 0.
    Here is how my program has been written.
    PROCEDURE extract_materials
    IS
    CURSOR xyz
    BEGIN
    FOR xyz1 IN xyz LOOP
    -- once inside the loop for each of the record from
    the cursor I need to find a total count for that record for everymonth in the year.
    All these records will be instered in to a staging table
    Can you please help me out with this. I really appreciate this.
    Thanks in advance.
    -Vani

    Andrew - you missed the tricky bit of the spec - include missing months with a zero.
    You need to do an outer join to a select from any big table with a function involving rownum and add_months to generate all the possible months. However, its time to go home and I can't be bothered to work out the finer details.

  • F4 help for month and Year field in ztable please

    I have created a ztable. 
    The first field in my ztable is a primary key field and it holds MM/YYYY(eg.  08/2011).
    How ever my requirement is when ever we want to see the output, uer wants F4 help on that fields and when he selects the range , the ztable should display the values in that range.
    For eg.
    1). if user selects   01/2011  to 08/2011 using F4 Help,
    2). then the ztables should display all the records in that range.
    Thanks in advance for your help.
    Best regards,Sam
    Moderator message : Spec dumping / Outsourcing is not allowed.  Thread locked.
    Edited by: Vinod Kumar on Aug 8, 2011 11:17 AM

    Hi Sam,
    Create an F4 help using this FM
    l_t_date" has month and date
    l_f_programm = sy-repid.
        l_f_dynnr    = sy-dynnr.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield         = 'Date'"Field name of coloum of value tab
            dynpprog         = l_f_programm
            dynpnr           = l_f_dynnr
            dynprofield      = <>"Screen field name'
            value_org        = 'S'
            callback_program = l_f_programm
            callback_form    = ''
          TABLES
            value_tab        = l_t_date"Value table for date and month
    *      FIELD_TAB        = L_T_RETURN
            return_tab       = l_t_return_tab
          EXCEPTIONS
            parameter_error  = 1
            no_values_found  = 2
            OTHERS           = 3.
        READ TABLE l_t_return_tab INDEX 1.
        IF  sy-subrc = 0 .
        <fields> = l_t_return_tab-fieldval.
        ENDIF.
    Regards,
    Amit
    then filter the ztable accordingly

  • Any idea why in Numbers my COUNTIFS formula keeps breaking? For daycare purpose, I use a spreadsheet that helps me to count how many children I have at 3:15, 4:15 and 5:00. COUNTIFS works well when I create it but breaks after a while. Also I am using a p

    Any idea why in Numbers my COUNTIFS formula keeps breaking? For daycare purpose, I use a spreadsheet that helps me to count how many children I have at 3:15, 4:15 and 5:00. COUNTIFS works well when I create it but breaks after a while. Also I am using a pop-up menu in the cells in time format, does it have any consequence on the formula?

    Any idea why in Numbers my COUNTIFS formula keeps breaking? For daycare purpose, I use a spreadsheet that helps me to count how many children I have at 3:15, 4:15 and 5:00. COUNTIFS works well when I create it but breaks after a while. Also I am using a pop-up menu in the cells in time format, does it have any consequence on the formula?

  • I have had my I have had my iPhone 5c for a little over a month and people can never hear me during calls, like I'm in a tunnel or muffled! I googled this issue and several others have had this problem as well. What can I do to get help?

    I have had my I have had my iPhone 5c for a little over a month and people can never hear me during calls, like I'm in a tunnel or muffled! I googled this issue and several others have had this problem as well. What can I do to get help?

    Take it in to an Apple store or authorized service center for evaluation and possible replacement.

  • I cant get help for same issue lasting over 19 months now!!!

    This is a long issue here but everything is available to see per Verizon in the notes. I have tried many many times to get assistance and I am getting no where with the many customer service reps that I have spoken to.
    The issue started in September 2013 with my home fusion account. I had had it for several months with no issues.  Then 1 day after my billing schedule I started receiving text messages saying my usage was almost over the 10GB again in 1 day. I called to ask customer service what the deal was. I was told that perhaps since its just the 1 day after my billing schedule perhaps the system is just overlapping. I was told to give it a few days and it should straighten itself out. I did as told but kept receiving the text messages saying the overage was still pulling GB. I called back and a new gentleman told me to go ahead and unplug the unit until we figure it out. I did as told. However by this point I had racked up about $1500 of overages. The tech department could not say anything but that it was some cloud based service pulling the GB. We have no such thing and live on 30 acres in the woods with no one around as they said perhaps someone else was using our wifi. That wasn't possible but yet they still said it was something we did.   After some months going back and forth we finally agreed on a settling point where they paid a small portion and I paid the majority.  fast forward three months or so and I was still being charged the $100 month for a unit I was told to unplug. I called and said this was suppose to be cancelled back in October when we had the issues as we were not going to chance having another issue like this.  They lady said dhe would take care of it.  A few months later I called from the Verizon store and talked with another gentleman.  Again he said yes I see all the notes and issues and he would send up a note to the home fusion department to have that cancelled. I was ok with that. A few more motnhs go by and I STILL was being charged the $100 fee. I called again spoke to another lady and again was told it would be taken care of.  Then in about june or July 14 I called again and got to speak with a supervisor again. She looked in the notes, agreed it was suppose to be done sometime ago. I ask her how will that work with a refund as I been paying all this time for something unplugged that was suppose to be canceled. She said what I needed to do as the amount was too high for her to approve was email corporate. I got the information from her and did so. At that point I thought it was cancelled and then now I need to just figure out the refund part with corporate. Now all the sudden the charge appears back on my account. When I call they said it was suspended for vacation. Why would I need to suspend the account for vacation when it had not been used nor showed usuage on their end in nearly a year. So here we are now. After many emails to distrist managers, dozens of calls to customer service, and more no one has ever called back to follow up like many of the reps said they would. I was told there would be a $200 cancellation fee in the beginning when I was told to unplug device which I was fine with as I couldn't afford another $1500 bill if the receiver went crazy again..  19 MONTHS later this is still not solved and NO ONE has done anything they promised in regards to contacting me after I say that that's what the last rep said and they said NO but we definently will.  What do I do?

    The only sort of credit I was recieved was yesterday because apparently in
    October 14 instead of cancelling the person suspended the account for
    vacation use and it came back on and I was being charged again for last few
    months so they returned $198 for the last couple months of charges but then
    charged me $140 to cancel.  The deal is this should have been canceled in
    early 14 and I can not get anyone to help in regards to all those months I
    was charged then. The rep yesterday kept trying to send me to financial
    care to discuss that but I know good and we'll that financial care can not
    handle any credits etc. So it was a year of left I was being charged. As
    far as tickets they had opened tickets in the past in regards why the
    overage occurred which we "resolved" but my issue has been the lack of
    cancellation after many request way prior and the fact I was told to unplug
    the unit in case it was the unit. It was unplugged in Sept 2013 and never
    plugged back in. They show no use had ever been used since then, they know
    we had a issue, but still charged me for a year for the service.  The other
    part that really bothers me was when the overage was occurring was they
    said they would upgrade it to tech. I called back 2 weeks later and it
    still hadnt been upgraded to tech. As soon as it was upgraded they called
    and said jnplug.  But during that 2 week period it caused a $1000 of
    overage.  I have email confirmations of this where the tech apologized for
    not getting it up the the correct department but said I was still liable
    for the charged occurring through that time even though if he would have
    sent it that day instead of 2 weeks later we would have known to unplug
    then and avoid that extra $1000 in charges.  I have and would be willing to
    share those emails with anyone. I was put in a corner to try and pay that
    so that my phone lines would stay active as verizon is the only thing that
    works here and they said it would go against my credit.  Again email
    aknowledgement saying they didn't get the issue up to the tech for 2 weeks
    and during that time the issue ran many GB but I was still responsible for
    the charges even though when they did get it to them like they were suppose
    to the first time problem was "solved" right away by being told to unplug
    unit.  Even when I tell reps that I have all these emails from techs
    adwaynd reps showing these things they have never asked to see them or
    anything. They say  no computer says it was your fault.  I just don't
    understand.
    On Mar 31, 2015 10:31 PM, "Verizon Wireless Customer Support" <

  • Find total count for Address Book?

    In Snow Leopard it was easy to find the "Total Count" for ALL CONTACTS. As soon as you clicked on ALL CONTACTS or even a GROUP in all contacts the amount showed at the bottom of the screen. LION appears to be different. I know you can click on ALL CONTACTS, scroll all the way down to find the total number of contacts (a lot of trouble). However, if you click on a GROUP the total does not show "at the bottom"??? You can go to Address Book > Edit > Edit Dirtribution List and see the totals of individual groups but ALL CONTACTS is not shown because it is a "distribution" of all contacts. Question is: Is there an easy way to find the total count not only for ALL CONTACTS but including GROUPS with out having to go to so much trouble?

    I find that if you have a critical number of cards in a group it will show the total number at the bottom of the list when you scroll down (I agree, a real nuisance!). I'm not sure what the critical number is, but I have lists with 20 cards and it doesn't show, while a list of 40 does show the total.
    I am not able to choose Edit > Edit Distribution List, since it is always greyed out. Is there are trick?
    I really find that Address Book in Lion has lost functionality – don't understand the change to a "book" format where you have to flip back and forth – would much prefer a 3 column format.

  • I ask for help, I can not cancel a monthly subscription to Adobe! contrary to the tutorial does not appear  scribed CANCEL PLAN on my page management plan, is not worse than any serial number of my subscription, where is it? how can I cancel monthly charg

    I ask for help, I can not cancel a monthly subscription to Adobe.
    contrary to the tutorial does not appear scribed "CANCEL PLAN" on my page management plan, is not worse than any serial number of my subscription, where is it? how can I cancel monthly charge? 

    Just to clarify: This is a user to user Forum, so you are not really addressing Adobe here, even though some Adobe employees thankfully have been dropping by.
    Have you done a Forum search?
    How can I delete my account? There is no "cancel plan" in my creative cloud free membership.
    Contact Customer Care

  • Formula help - Group totals for more than one date range

    Post Author: melcaylor
    CA Forum: Formula
    I need to show in 3 columns
    inside of a grouping that totals an amount field based on a date
    range that amount was posted.  So for example:
    Billy Bob in the state of MA made $5.5m total, $800k in the last 21 days, $400k in the last 14 days and $150k in
    the last 7 days.
    I assume this is possible but I
    just donu2019t know what type of formula to write to make it work.  For this
    example, there are 2 tables u2013 user table and $$ table.  The User table has
    the user name, the $$ table has the pay date and the amount. 

    Post Author: SKodidine
    CA Forum: Formula
    You only need simple formulae in Running Totals to accomplish this.
    1.  Group by Name
    2.  Create the following Running Totals:
    2.1 A running total to sum the pay amount for all records, and resets on 'Change of Group' of Name.
    2.2 A running total to sum the pay amount and for 'Evaluate' click on the radio button next to 'Use a formula' and then click on X-2 button next to it.
    In the formula workshop window type a formula such as: {table.payment_date} in (currentdate - 21) to currentdate;
    For 'Reset' click on the radio button next to 'On change of group' and pick the group name.
    2.3 Create another running total just as in step 2.2 above but change the formula to: {table.payment_date} in (currentdate - 14) to currentdate;
    2.4 Create the last running total just as in step 2.2 above but change the formula to: {table.payment_date} in (currentdate - 7) to currentdate;
    Hide the details section and in the group footer place text boxes with appropriate text and insert these running totals to give you the numbers you want.
    The only issue I see with this is if a person was paid yesterday a sum of $25, then it will show $25 for total, last 7days, last 14days and also for last 21days.  At first look it might be mistaken for $75.

Maybe you are looking for

  • Since recently updating (either Pro or Reader, not sure which), i cannot open PDF's without downloading them first. not sure how to fix!

    I updated, and now i can no longer view any files on the web without downloading them first. it's very frustrating. want to go back to the way it was, but not sure how.

  • How do i cut out high frequencies?

    Im fairly new to recording so i apologise for what might seem like a silly question.  Ive imported an acoustic guitar track which i have recorded in cubase to audition.  The only problem is that it has a very annoying bleeping metronome sound which y

  • How to get past iMessages to new iPhone?

    I just upgraded my Mom from an iPhone 3 to an iPhone 4 (which was my last phone). I made a backup of her last phone (the iPhone 3) as recommended before transferring, and proceeded to restore the phone from the backup, which seemed to work well, and

  • Goto frame in parent movie clip

    I have a movie clip nested with in another movie clip. I was wonder how i would do a on (release) gotoAndPlay command that would be able to take me to a frame in the parent movie clip. How do i jump back the parent movie clips timeline? thanks,

  • Cold Backup / Recovery for OEM Grid

    Hi friends, OEM 10.2.0.5 RHEL 4.6 How do you Clone or Backup OEM Grid (Management server(OMS) , agent, and repository database)? in case of disaster? They are all under our server dir /home/oracle. If I have a backup of my /home/oracle on external ta