Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: "Michael Kennedy" <Info@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Aug 2006 18:27:50 +0100
Daily$ $100
BGN 3/15/1999
END 4/1/2002
JAN $6600
FEB $6600
MAR $7806.45
APR $6673.33
this is what I would expect to see for the above date range
So... would this attack work:
- Ensure your "Calendar" table has a record for EVERY day, or at least
every WORKING day
- It should contain, at least, the actual Date, the Day-No-of-the-week
(0-6 or 1-7, and know which codes are Sat/Sun), the Month-No (1-12), and a
flag - 1="Worked", 0="Non-worked".
- Populate all fields, set that Worked-flag=1 on Mon-Fri, insert the
Month-No, etc...
Run a Query:
- On the Date field, say ">=~BGN, <=~END"
- Put a CHECK-mark on the Month-No field
- Run a "Count" or "Sum" on the Flag field
You'll get an answer of the No. of worked days, per month, spanning all
relevant years.
Run another query to multiply the Sum of worked-days by the Rate.
No "code"... though you might need some to extend the Calendar table - as
the need arises...
You could replace the above flag with the Daily-Rate itself (22.00), and
then just "sum" these in a single query - per month. This would allow
different rates over time...
- Mike
.
- References:
- HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: JeaNette
- Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: Larry DiGiovanni
- Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: Jeanette
- Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: Larry DiGiovanni
- Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- From: Jeanette
- HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- Prev by Date: Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- Next by Date: Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- Previous by thread: Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- Next by thread: Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table
- Index(es):
Relevant Pages
|
|