Get Record Count from SP called by an SP?
Posted on 2006-11-05
I have a sp that calls 2 differnt sp's based on a variable passed to it.
I want to check to see how many records are returned in the called sp, so if one is empty I can call the other as a backup.
Currently here is my sp that calls the other sp's
ALTER PROCEDURE [dbo].[MasterSearch]
@SearchType AS NVARCHAR(25),
@SearchTerms AS NVARCHAR(100),
SET NOCOUNT ON;
EXEC SearchCategoryRelations @SearchTerms, @Latitude, @Longitude
EXEC SearchSite @SearchTerms, @Latitude, @Longitude
INSERT INTO Searchs(SearchTerms,SearchType) VALUES (@SearchTerms,@SearchType)