I want to select the output of stored procedure and the count of the row affected
So am trying to do something like that
select * , count(*)
(
if @checker is not null
begin
exec [dbo].[GetEmployees]
@parameter1,
@parameter2
end
else
begin
exec [dbo].[GetEmployees]
@parameter3,
@parameter4
end
)T
I always get error like this
Incorrect syntax near the keyword 'if'.
Incorrect syntax near ')'.