Difference between revisions of "Remove No Biometric Templates"

From sbv.wiki
Jump to: navigation, search
(Created page with "Under certain circumstances, the no biometric template can update the employee's template. As of November 2015, an employee that is enrolled that is already in the software ca...")
 
 
Line 3: Line 3:
 
This script will use the templates from the punches to update the employee's template. Start with a date from the current month and work your way back a month at a time until all employees have a template.
 
This script will use the templates from the punches to update the employee's template. Start with a date from the current month and work your way back a month at a time until all employees have a template.
  
<nowiki>UPDATE
+
<nowiki>
 +
UPDATE
 
EmployeeClockID
 
EmployeeClockID
 
SET
 
SET

Latest revision as of 23:49, 12 November 2015

Under certain circumstances, the no biometric template can update the employee's template. As of November 2015, an employee that is enrolled that is already in the software cannot be made a no biometric employee at the clock. This is now controlled by the software, in the same manner that supervisors are controlled by the software.

This script will use the templates from the punches to update the employee's template. Start with a date from the current month and work your way back a month at a time until all employees have a template.

UPDATE
	EmployeeClockID
SET
	HandPunchTemplate0 = RawPunch.HandPunchTemplate0,
	HandPunchTemplate1 = RawPunch.HandPunchTemplate1,
	HandPunchTemplate2 = RawPunch.HandPunchTemplate2,
	HandPunchTemplate3 = RawPunch.HandPunchTemplate3,
	HandPunchTemplate4 = RawPunch.HandPunchTemplate4,
	HandPunchTemplate5 = RawPunch.HandPunchTemplate5,
	HandPunchTemplate6 = RawPunch.HandPunchTemplate6,
	HandPunchTemplate7 = RawPunch.HandPunchTemplate7,
	HandPunchTemplate8 = RawPunch.HandPunchTemplate8
FROM
	EmployeeClockID
INNER JOIN
	RawPunch
ON
	EmployeeClockID.FkEmployeeID = RawPunch.FkEmployeeID
WHERE
	RawPunchType = 7 -- good punch
	AND RawPunch.HandPunchTemplate0 <> 255 -- do not want no biometric templates
	AND RawPunchDateTime > '12/1/2015' -- recent punches first
	AND EmployeeClockID.HandPunchTemplate0 = 255 -- and employee has a no biometric template

SELECT
	*
FROM
	EmployeeClockID
WHERE
	HandPunchTemplate0 = 255