In the initial release of the Calendar Widget, there is a small mistake in the SQL that results in the Education Type not being presented properly
It will represent itself like this (Instead of education type being shown it will look like this, aka an end parentheses is just shown)
(People who started using Calendar Widget from B1UP 2020.05 and higher will not have this issue).
If you have this issue here is the correct SQLs you need to put in the Employee Education Source
MSSQL:
SELECT
T0.empID AS 'PrimaryKey',
T1.line AS 'SecondaryKey',
'171' AS 'ObjectType',
T1.fromDate AS 'StartDate',
T1.toDate AS 'EndDate',
CONCAT(T0.firstName, ' ', T0.lastName,' (', T2.name,')') AS 'Subject',
T1.institute AS 'Location'
FROM OHEM T0 JOIN HEM2 T1 WITH (NOLOCK) ON T0.empID = T1.empID LEFT JOIN OHED T2 WITH (NOLOCK) ON T1.type = T2.edType
WHERE (@StartDate BETWEEN T1.fromDate AND T1.toDate OR T1.fromDate BETWEEN @StartDate AND @EndDate OR T1.toDate BETWEEN @StartDate AND @EndDate)
AND T0.Active = 'Y'
HANA:
DO BEGIN
DECLARE StartDateVar DATETIME = @StartDate;
DECLARE EndDateVar DATETIME = @EndDate;
SELECT
T0."empID" AS "PrimaryKey",
T1."line" AS "SecondaryKey",
'171' AS "ObjectType",
T1."fromDate" AS "StartDate",
T1."toDate" AS "EndDate",
T0."firstName" || ' ' || T0."lastName" || ' (' || T2."name" || ')' AS "Subject",
T1."institute" AS "Location"
FROM "OHEM" T0 JOIN "HEM2" T1 ON T0."empID" = T1."empID" LEFT JOIN "OHED" T2 ON T1."type" = T2."edType"
WHERE (StartDateVar BETWEEN T1."fromDate" AND T1."toDate" OR T1."fromDate" BETWEEN StartDateVar AND EndDateVar OR T1."toDate" BETWEEN StartDateVar AND EndDateVar)
AND T0."Active" = 'Y';
END;
Comments
0 comments
Please sign in to leave a comment.