1: 2: 3: 4:
t.SaleID, t.OtherFields vorwählen , dbo.YourFunction (t.SaleID, @companyID) x VON yourtable t WO t.com panyid = @companyID