Calculating between dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mtchampi
    New Member
    • Aug 2007
    • 2

    #1

    Calculating between dates

    Hello all,

    I have a limited SQL background, and I am responsible for creating a monthly report that displays separate tables for the following:

    1. Calculate individual monthly totals of files processed (created) that month
    2. Accumulating totals per month, (eg. Jan 200 files, Feb 300 files, so Feb would now read as 500 files)
    3. Take a constant number, say 10,000 records, subtract the year to date result(from the accummulating totals) and display the balance of files still to be processed.

    I'm at a loss how to write sequel code to give me 3 separate tables. Please help.

    Regards,
    Peggy
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Peggy.

    You posted this in the Articles section. I'll go ahead and move it to the Forum where an Expert will be more likely to find it.

    Comment

    • bsm2th
      New Member
      • Aug 2007
      • 13

      #3
      Doesn't sound like you need many tables. They are a place to put rows of data. This seems to be more like looking a data that is already there and doing some totals. The only table needed would be to hold the monthly totals for past months.

      1> For this item, It sounds like it would be easiest to look at a directory and see how many files are there. I don't know how to so this automatically, but it wouldn't be much trouble to go to a table for these values and enter, say 820 for 08/2007.

      2> A program could now go through that table and give a current total for the year.

      3> After the number for 2 was done, instead of displaying that total, just show 10000-total.

      Hope it helps..

      Bob

      Comment

      Working...