Warning About User Defined Functions in SQL Queries
I was looking at a query today that has an inline expression in it, something similar to
CASE WHEN myTable.myColumn < 5 THEN NULL ELSE myTable.myColumn END
This particular piece of business logic is used in many different places (well,
not literally, since I made up a fake example), so I created a UDF to simplify
the queries that use this statement. Suppose that UDF is called
dbo.fnNulifyMyColumn
.