I have this stored procedure:
ALTER PROCEDURE spCertificationType
@result nvarchar(15) output,
@mode int
AS
BEGIN
if @mode = 1
begin
exec spGeneratedID 2, @result output
print @result
end
END
but when I tried to execute it, he has this error
The formal parameter "@mode" was not declared as an OUTPUT parameter, but the actual parameter was passed in the requested output.
I tried to set @modeas output as follows:
ALTER PROCEDURE spCertificationType
@result nvarchar(15) output,
@mode int output
AS
BEGIN
if @mode = 1
begin
exec spGeneratedID 2, @result output
print @result
end
END
but it returns a null value.
Any fix for this? Thanks in advance.
source
share