in reply to Re^3: Pull data from two tables, insert into new table?
in thread Pull data from two tables, insert into new table?

Thank you, poj.

Yes, I think that is right--the table should be rewritten each night. We generally run our exception hours by the semester, so it can contain up to three months' worth. The beginning and end of the semesters can be dicey though, a lot of changes going on.

I could also see the value, however, of keeping previous exception dates stored, so that the "analog" calendar the combined table populates can be turned back, say, to last year to see what hours we were keeping then--for statistical purposes or whatever.

Thanks again--I'm going to start working with this and see what I come up with!

HC

  • Comment on Re^4: Pull data from two tables, insert into new table?

Replies are listed 'Best First'.
Re^5: Pull data from two tables, insert into new table?
by poj (Abbot) on Feb 16, 2016 at 19:14 UTC

    Ok, the major complication I see is if you implement a change to the regular hours in the future. You would need to add valid_from_date ,valid_to_date fields to that table, or do they have them already ?

    poj

      :-) Yes, the calendar_begin_date is 8/10/2010 and the calendar_end_date is 8/31/2024.

      I was just thinking that, since the regular hours really do not change, I could just put them in the script as a hash--as you have done--and then grab the exception hours each night and somehow sort them through the regular hours to see where each exception would fit. (?) That way, if the regular hours change, all I need to do is change them in the script.

      So, if an exception, then exception hours. If no exception, then regular hours....

      Thanks for helping me think this through.