How to check if staff member has end date with a Null value
SELECT employee_no
FROM source_table
GROUP BY employee_no
HAVING COUNT(*) = COUNT(finish)



Is there a way to include the whole table in that sequence? – Chris
select serverproperty('ProductVersion') as [version], serverproperty('Edition') as [edition] and got Version 13.0.5102.14 of edition Devleoper Edition (64-bit) – Chris
This is (Microsoft) SQL server 2016 SP2. – Akina

WITH cte AS ( SELECT Employee_No,
                     Task,
                     Start,
                     Finish, 
                     MAX(CASE WHEN Finish IS NULL 
                              THEN 1 
                              ELSE 0 
                              END) OVER (PARTITION BY employee_no) have_nulls
              FROM source_table
            )
SELECT Employee_No,
       Task,
       Start,
       Finish
FROM cte
WHERE have_nulls = 0
/* ORDER BY 1,2,3 */