I have some worthless ideas for you, Babcock.

I read all the other posts here and frankly do not understand why
everything is so complicated.  I will give you the simplest way to
accomplish this.  Then you can criticize it, reject it, and wind-up
using it a week from now <g>.

Create a table with two fields: one in date format containing the
sequential dates from any day to any other day (also the pk), the other
(named work) in binary integer format where 1 means you work and 0 means
you do not. I am assuming that you know how many days a process will
take.  So when you need to compute a completion date ...

select halsmarvelouscalendartable
set order to indexedbydate
.
.
.
days-needed=somemagicknumber
days-got=0
select halsmarvelouscalendartable
seek starting-date
scan rest while days-got<days-needed
        days-got=days-got+halsmarvelouscalendartable.work
endscan
ending-date=halsmarvelouscalendartable.date
.
.
.

The usual disclaimer about possibly having to adjust the result by
adding or subtracting one to account for inclusive or exclusive
end-points.

The advantage of this scheme is that it is simple, yes .. perhaps too
simple for today's complexity-intensive systems and that it is
extensible in the horizontal aspect so that individual schedules may be
maintained and queried programatically (i.e. one column per employee can
include vacation time as well as weekends and holidays)

Good luck!

B+
HALinNY


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to