Is it possible to store different select value to the same variable?
DECLARE @cout int
SELECT @cout= count(*) FROM Master1 WHERE (...)
SET @cout = SELECT count(*) FROM Master2 WHERE (...)
SET @cout = SELECT count(*) FROM Master3 WHERE (...)
IF(@cout = 0)
BEGIN
END
How about:
It should do the trick, and pull out quickly enough…