I want the total number of records from 2 child tables that are related to a parent table.
This doesn't work:
CREATE PROCEDURE [MyProcedure]
SET @Count =
SELECT COUNT(*) FROM Table1 WHERE ForeignKey = @MyPrimaryKey AND Active = 1
SELECT COUNT(*) FROM Table2 WHERE ForeignKey = @MyPrimaryKey AND Active = 1