I'm trying to return the value of a COUNT query as an integer can someone tell me what I'm doing wrong now?
Thanks
Code:
CREATE PROCEDURE [dbo].[Countit]
AS
BEGIN
SET NOCOUNT ON;
SELECT COUNT(CompanyDetailID) as CountOfID
FROM mainCompanyDetail
WHERE Deleted = 0
return CountOfID
END
Thanks