I have a stored procedure where I would like to input ONLY 1 parameter, but when I execute the SP, it expects 2 parameters! I don't know why! I enter the CheckNum fine, but then it expects me to enter myRowCount as well, but isn't it an OUTPUT paramater:
Hopefully someone can help me!
Code:
CREATE PROCEDURE dbo.spGetChecksByCheckNum
(
@CheckNum varchar(50),
@myRowCount int output
)
AS
SELECT CheckID, Vendor, Invoice, Amt, CheckNum, CheckAmt, Status FROM tblChecks INNER JOIN tblStatus ON tblChecks.StatusID = tblStatus.StatusID WHERE CheckNum = @CheckNum;
/* @@ROWCOUNT returns the number of rows that are affected by the last statement. */
SELECT @myRowCount=@@ROWCOUNT