• Sue_H - Wednesday, December 27, 2017 5:41 PM

    You have the cte doing a select 1 so it's only selecting one row with the most recent laststatuschecktime.
    Try removing the top 1 and filter by computer name outside of the cte

    Sue

    Hi Sue, 
    I need to use the TOP 1 with ORDER BY so i can get only one value per machine for the status.Only way i was able to get this to work.