MikeMcKeown
Programmer
Hi all,
I have created the following stored procedure however I keep getting an error saying that there is an error near the SET. Am i right in assuming that I could use the output of the query in an adp project with VB. I could say if output greater than 2 then ......
CREATE PROCEDURE SP_Count_Territories
(@RCValue as numeric, @RecCount AS int output)
SET @RecCount = (SELECT COUNT(No) AS [Count]
FROM dbo.Details
GROUP BY _No
HAVING (Details.No = @RCValue))
RETURN
Thanks in advance
I have created the following stored procedure however I keep getting an error saying that there is an error near the SET. Am i right in assuming that I could use the output of the query in an adp project with VB. I could say if output greater than 2 then ......
CREATE PROCEDURE SP_Count_Territories
(@RCValue as numeric, @RecCount AS int output)
SET @RecCount = (SELECT COUNT(No) AS [Count]
FROM dbo.Details
GROUP BY _No
HAVING (Details.No = @RCValue))
RETURN
Thanks in advance