Rob Farley has a great post on when is a SQL function not a function? Read the two below functions – they return the same thing, but one is more effecient than the other. If you can’t see why, head over to Rob’s post that shows the execution plans for a great explaination. CREATE FUNCTION dbo.FetchSales_inline(@salespersonid […]