Home > database >  SQL statements using single day duty roaster for working days all the year round roaster
SQL statements using single day duty roaster for working days all the year round roaster

Time:10-21

The select M.l oginid, M.l astname, m. EPARTMENTMARK, m. IELD002, m. IELD003, M., m., M.u ptime, m. owntime
The from
ARRANGESCHEDULE_A M, nowdate N
Where m. IELD003=N.S IGNDATE
The union
Select t.l oginid, t.l astname, to_char (HRMDEPARTMENT. DEPARTMENTMARK) as DEPARTMENTMARK, t.i d as field002, N.S IGNDATE, to_number (' 5 '), as do to_number (' 2 ') as Hugh, to_date (N.S IGNDATE | | '08:30:00', '- dd yyyy - mm hh24: mi: ss') as uptime, to_date (N.S IGNDATE | | '05:30:00', '- dd yyyy - mm hh24: mi: ss') as downtime
The from HRMRESOURCE t, nowdate N, HRMDEPARTMENT
Where t.d epartmentid=HRMDEPARTMENT. ID
And loginid not in (select M.l oginid
The from
ARRANGESCHEDULE_A M, nowdate N
Where m. IELD003=N.S IGNDATE);
This is a roaster, because there is no normal class scheduling, database logic is to remove abnormal scheduling, and all the rest of the company's normal work, also is the rest of the people are at 8:30 to 5:30, add up to is roaster, change the signdate nowdate list scheduling can see every day, but it is not holiday this logic, so I set up a year-round job RiBiao, I think every day is a table, I want to put all of the working day view the results produced by this view is inserted into an empty table, you can get a whole year work RiBiao, specifically how to implement, please consult,

Additional: work RiBiao is shown below, I am going to put daylist fields every date, in turn, is inserted into the signdate this parameter, the each table in turn into an empty list
  • Related