Hello, All,
This is my stored procedure, but doesn't work. The error is: "subquery returned more than one value".
CREATE PROCEDURE qrycount AS
update complaints
set num_of_complaints =
(select count(compli_num)
from complaints where compli_num is not null group by compli_num )
GO
Thank you very much for your help.
Jing
This is my stored procedure, but doesn't work. The error is: "subquery returned more than one value".
CREATE PROCEDURE qrycount AS
update complaints
set num_of_complaints =
(select count(compli_num)
from complaints where compli_num is not null group by compli_num )
GO
Thank you very much for your help.
Jing