How to correctly use select top 1 inside a inner join of an update statement in T-SQL.
And the answer is: don’t use select top 1, instead use the row_number() function and the OVER clause. Lets assume we have a table structure like: Table [Observation] Multiple observations during a TimeSpan…