använd yttre/kors tillämpa
:
select *
from Employee as E
cross apply dbo.[StateFixedTaxesCalculation](3020, E.EmployeeId, 1, 1006) as TC
om du fortfarande måste filtrera efter TC.EmployeeId =E.EmployeeId
, kan du göra detta med subquery:
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