Document toolboxDocument toolbox

14.1 sp115_shifts

This table contains details of each of the working shift periods for each working day. Each record in the table represents one working shift period; for a typical shift pattern involving employees working Monday to Friday, there will be five records in this table, one for each day of the week.


 The shift can specify a "night shift", or similar. This is achieved by specifying that the shift period starts before "0000", or alternatively by specifying that the shift period ends after "2400". A shift period must be within the bounds of its working day and must not be longer than 24 hours.


 The shift may include a number of breaks. If specified, they must be within the bounds of the shift. If breaks are not defined, then break_spec_id will be null.


 

Table Definition

Field
Type
Default
Nullable
shift_specnumber(4) (error)
day_numbernumber(3) (error)
start_timenumber(4) (error)
end_timenumber(4) (error)
lunch_startnumber(4) (deprecated)
lunch_endnumber(4) (deprecated)
lunch_duration

number(4)

 (deprecated)
capacity_shiftnumber(1) (tick)
ADJ_shiftnumber(1) (tick)
break_spec_idnumber(4) (tick)

Keys 

primary key (shift_spec, day_number) 
foreign key (shift_spec) references sp114_shift_specifications (shift_spec)

Column Descriptions

FieldDescription
shift_specShift pattern identifier
day_numberDay number within the shift pattern (0 to 370) to which this shift applies. The number must be less than the period specified for the shift in sp114_shift_specifications. Day 0 is a Sunday, as are days 7, 14 and 21 etc.; days 1, 8, 15 and 22 etc. are Mondays; etc. (Note that this differs from the usual convention of numbering days from 1, Sunday, to 7, Saturday.).
start_timeThe time of day at which the shift period starts. Uses employee's Time Zone. This is expressed as a number of minutes offset from "0000" and must be in the range –1380 to +1380.
end_timeThe time of day at which the shift period ends. Uses employee's Time Zone. This is expressed as a number of minutes offset from "0000" and must be in the range +60 to +2820.
capacity_shiftA flag indicating whether this shift provides capacity that jobs on the shift then consume.
 A value of 1 indicates that the shift provides capacity
A value of 0 indicates that the shift does not provide capacity
A value of NULL causes the shift pattern's capacity_shift flag to be used instead.
ADJ_shiftA flag indicating whether All Day Jobs can be automatically allocated to this shift. A value of 1 indicates that All Day jobs can be automatically allocated to this shift.
 A value of 0 indicates that All Day jobs cannot be automatically allocated this shift.
A value of NULL causes the shift pattern's ADJ_shift flag to be used instead. 
break_spec_idThe associated break pattern to be used for this shift specification