използвайте outer/cross applyкод>
:
select *
from Employee as E
cross apply dbo.[StateFixedTaxesCalculation](3020, E.EmployeeId, 1, 1006) as TC
ако все пак трябва да филтрирате по TC.EmployeeId =E.EmployeeId
, можете да направите това с подзаявка:
select *
from Employee as E
cross apply (
select TT.*
from dbo.[StateFixedTaxesCalculation](3020, E.EmployeeId, 1, 1006) as TT
where TT.EmployeeId = E.EmployeeId
) as TC