I got a query problem, code below: I would it to do the Person as column name and list below all names.
Msg 512, Level 16, State 1, Line 6
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
declare @Time datetime = ( SELECT TOP 1 [Time]
order by Time desc)
join data.Update sparffa
on dataff.SDD = sparffa.SDD
WHERE [Time] >= @Time AND Termination = 'S') As Person