To fill one variable with a value from a query I can write following:
SET @TargetID = (SELECT TOP 1 ID FROM @bigDataSet ORDER BY date DESC)
To fill multiple variables from this query, eg. something like:
SET (@TargetID, @TargetName) = ....(SELECT TOP 1 ID, [Name] FROM @bigDataSet ORDER BY date DESC)
what can I write?