'Filtering based on the end date
Have tried to create a query that will take probation end date and display anyone whos end date is within the next month. The report runs without any errors but is not displaying the correct results as it shows people that are over a month away from the end date.
SELECT "Business Unit"."Business Unit Name" saw_0,
"Worker Assignment Details"."Assignment Created By" saw_1,
"Worker"."Employee Name" saw_2,
"Position"."Position Name" saw_3,
"Worker"."Person Number" saw_4,
"Worker"."Person Start Date" saw_5,
"Worker"."Probation Period" saw_6,
"Worker"."Probation End Date" saw_7,
"Position"."Position FTE" saw_8,
"Position"."Effective End Date" saw_9,
"Worker"."Normal Working Hours" saw_10,
DESCRIPTOR_IDOF("Workforce Management - Worker Assignment RealTime"."Business Unit"."Business Unit Name") saw_11,
DESCRIPTOR_IDOF("Workforce Management - Worker Assignment RealTime"."Position"."Position Name") saw_12
FROM "Workforce Management -Worker Assignment Real Time"
WHERE ("Position"."Position FTE" >= 0.01)
AND (DESCRIPTOR_IDOF("Workforce Management - Worker Assignment Real Time"."Business Unit"."Business Unit Name") = GHZ)
AND ("Worker"."Probation End Date" >= ((TIMESTAMPADD(SQL_TSI_MONTH, +1, CURRENT_DATE)) ))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
