View challenge



I have a number of tables as below:
employee(*employeeid, ....)
schedule(*scheduleid, recur_interval, ...)
emp_schedule(*employeeid, *scheduleid, *valid_from, valid_to)
workshift(*scheduleid, *shiftid, starttime, endtime)

recur_interval indicates the number of days for which the schedule
should recur.
starttime and endtime indicates the first occurrence of the workshift.

Now I want to create a view (without using stored procedure) that
returns every occurrence of the workshifts for every employee, like
below.

create view emp_calendar as
select
employeeid,
starttime,
endtime
......

Does someone has a solution (preferably MySQL) for this, or is it
simply impossible?

Fredrik Bertilsson

.



Relevant Pages

  • Re: Query - Calulations
    ... return the running time, up to now, if endTime is null, but startTime is ... > I have a small employee database that tracks time away from the ... If "Out all Day" is selected then the start and end time fields are ...
    (microsoft.public.access.queries)
  • RE: calculating difference between date/time fields
    ... Function BusinessHours(StartTime As Date, Endtime As Date) ... Dim DiffTime As Double ... If Endtime < StartTime Then ...
    (microsoft.public.excel.programming)
  • Re: Delphi 6 vs C# speed comparison
    ... str: string; ... startTime: TDateTime; ... endTime: TDateTime; ...
    (borland.public.delphi.non-technical)
  • RE: calculating difference between date/time fields
    ... Function BusinessHours(StartTime As Date, Endtime As Date) ... Dim DiffTime As Double ... If Endtime < StartTime Then ...
    (microsoft.public.excel.programming)
  • Re: How can I time the speed of a macro?
    ... timer resolution is one second. ... Dim StartTime As Double ... Dim EndTime As Double ...
    (microsoft.public.excel.programming)

Loading