Newbi - Saturday, August 12, 2017 11:51 PM
In your client application, I presume you're displaying information for one employee (in response to a click or some other event) or for a group of employees (for a page) at once.
If you're showing a single employee, the example query above can be called from your .NET code. If you're displaying a page, you should be able to use something similar to the following to include the data from the function.
SELECT TOP 20 e.FirstName, e.LastName, p.TaxableIncome
FROM dbo.EmpTable e
CROSS APPLY dbo.fn_CalculateNetPay(e.EmpID) p
WHERE whatever_your_using_to_return_a_page_of_rows_to_display
ORDER BY e.LastName;