Hi, I am trying to update a value of a table from a sub query, and I am not sure where I am going wrong. Below is what I am trying to do, and the error message which I got
Msg 116, Level 16, State 1, Line 1
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.
select (SELECT AVG(RATING) FROM Rating WHERE BrickID = B.BrickID) AS Rating, * FROM Brick B
UPDATE Brick SET ThumbsUp = 1500 - (SELECT ROW_NUMBER() OVER (ORDER BY RATING DESC), * FROM BrickRatings WHERE BrickID = Brick.BrickID)