Only one expression can be specified in the select list when the subquery is not introduced with EXISTS SQL

Viewed 35
create proc Расчет_стоимостизаказа
(
  @zakaz int
)
as
begin
    Update Заказы
    set Заказы.ОбщаяСумма= (
        SELECT
           Заказы.ЗаказID,
           SUM(ЗаказаноТоваров.Количество*ЗаказаноТоваров.ЦенаПродажи)
        FROM Заказы,
             ЗаказаноТоваров
        WHERE Заказы.ЗаказID = @zakaz
        Group By Заказы.ЗаказID
     )
end

This error comes out: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.

0 Answers
Related