Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jun 2007
    Location
    Rochester, New York, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple Date Counts (2003)

    I have been asked to do a report for a lawsuit that gives the total amount of pay based upon the actual number of days worked during a specified timeframe multiplied by the pay rate. Easy enough to do right? Not so in this case.

    For over 2,000 employees with varying start dates, I need to count the number of days from [HireDate] to [3MoRaise] multiplied by [StartPay], then repeat the same process for number of days from [3MoRaise] to [6MoRaise] and again for [6MoRaise] to [1YrRaise] and again for [1Yr] to [2Yr] and so on. Thank goodness this only goes back for three years from the day the employee has joined the lawsuit so the farthest back I have to go is January of 2003 but there is the distinct possibility that there may be as many as 6 to 8 changes in pay.

    My original

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple Date Counts (2003)

    Welcome to Woody's Lounge!

    If the import from different locations is slow, there's probably not much you can do about that.
    If the queries on the imported data are slow, it might be worth while to investigate them, but we'd need to know more about the structure of the data and the design of the queries.

  3. #3
    New Lounger
    Join Date
    Jun 2007
    Location
    Rochester, New York, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple Date Counts (2003)

    Hans - Thanks for responding to my post. I've been looking at my table structure and have been modifying them to index most of the information which should speed things up. I have trimmed my queries back as much as I can, but I think it's just the massive amount of data that needs to be processed that is slowing things down. (One data location contains over 2,000,000 records!).

    What I'm really looking for help on is how to write a query to get the information needed for the report. I'm stumped at how to even start getting multiple date counts from one query using ever changing date parameters. Or is it even possible?

    Thanks, Elaine <img src=/S/butterfly.gif border=0 alt=butterfly width=15 height=15>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple Date Counts (2003)

    I'm sure it's possible, but we'd need to have an idea what the table(s) look like (with some fake data). Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •