Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/18/2024 04:58 PM
SELECT u.owner as ManagerEmail, CONCAT(u.Firstname, ' ', u.Lastname) AS DISPLAYNAME, u.email AS ConsultantEmail, u.EMPLOYEEID AS EmployeeNumber, u.CUSTOMPROPERTY12 AS EmployeeStatus, CASE WHEN u.STATUSKEY = 1 THEN 'Active' ELSE 'Inactive' END AS StatusSaviynt, u.ENDDATE AS ConsultantEndDate, DATEDIFF(u.ENDDATE, CURDATE()) AS DaysUntilEndDate FROM users u WHERE u.employeetype = 'Contractor' AND DATEDIFF(u.ENDDATE, CURDATE()) = 14 AND u.STATUSKEY = 1;
09/18/2024 06:29 PM
SELECT u.owner AS Manager_Email,
Concat(u.firstname, ' ', u.lastname) AS Full_Name,
u.email AS Consultant_Email,
u.employeeid AS Employee_Number,
u.customproperty12 AS Employee_Status,
CASE
WHEN u.statuskey = 1 THEN 'Active'
ELSE 'Inactive'
END AS Employment_Status,
u.enddate AS Consultant_End_Date,
Datediff(u.enddate, Curdate()) AS Days_Until_End_Date
FROM users u
WHERE u.employeetype = 'Contractor'
AND Datediff(u.enddate, Curdate()) = 14
AND u.statuskey = 1;
09/19/2024 05:31 AM
I am getting the same error, what exactly is the issue with the format of the query?
09/19/2024 05:55 AM - edited 09/19/2024 08:55 AM
SELECT u.owner AS Manager_Email,
CONCAT(u.firstname, ' ', u.lastname) AS Full_Name,
u.email AS Consultant_Email,
u.employeeid AS Employee_Number,
u.customproperty12 AS Employee_Status,
CASE
WHEN u.statuskey = 1 THEN 'Active'
ELSE 'Inactive'
END AS Employment_Status,
u.enddate AS Consultant_End_Date,
DATEDIFF(u.enddate, CURDATE()) AS Days_Until_End_Date
FROM users u
WHERE u.employeetype = 'Contractor'
AND u.enddate = CURDATE() + INTERVAL 14 DAY
AND u.statuskey = 1;
09/19/2024 08:45 AM
SELECT
u.owner AS ManagerEmail,
CONCAT(u.Firstname, ' ', u.Lastname) AS DisplayName,
u.email AS ConsultantEmail,
u.EMPLOYEEID AS EmployeeNumber,
u.CUSTOMPROPERTY12 AS EmployeeStatus,
CASE WHEN u.STATUSKEY = 1 THEN 'Active' ELSE 'Inactive' END AS StatusSaviynt,
u.ENDDATE AS ConsultantEndDate,
DATEDIFF(u.ENDDATE, CURDATE()) AS DaysUntilEndDate
FROM
users u
WHERE
u.employeetype = 'Contractor'
AND u.ENDDATE = CURDATE() + INTERVAL 14 DAY
AND u.STATUSKEY = 1;