Instead of this:
-- Method call
SELECT @FunctionResult = DWH_Staging.adm.SalesPlanExists(@Year, @Month, @CountryID, @Type)
I want to use something like this:
DECLARE
@TestedDatabase = 'DWH_Staging',
@TestedSchema = 'adm',
@TestedObject = 'SalesPlanExists'
DECLARE @sql NVARHCAR(4000) = '@TestedDatabase+'.'+@TestedSchema+'.'+@TestedObject (@Year, @Month, @CountryID, @Type)'
-- Method call
SELECT @FunctionResult = @sql
Hints would be appreciated.