ROUND or truncate is a choice about the result, not its display format. This complete decimal example checks positive and negative values while preserving enough width for thousands.
SQL SERVER – Find All The User Defined Functions (UDF) – Part 2
Madhivanan shared another way to find all the user defined functions in a database, using information_schema.routines. Here is his short script.
SQL SERVER – UDF to Return a Calendar for Any Date for Any Year
Reader Dan Golden built on my weekly calendar function to create a UDF to return a calendar for any date for any year. I fixed a small first and last week bug.
LOG With a Base: Make the Calculation Explicit
LOG with a base makes logarithm meaning explicit. Compare base two, base ten and the natural default using typed, positive inputs.
NULL Sort Order: Put Missing Values Where Readers Expect
NULL sort order uses a CASE bucket to put missing values last. Keep a stable tie breaker and preserve the original score.
CHAR: Invalid Character Codes Return NULL
CHAR constructs a character instead of printing an integer. Preserve byte-code inputs and distinguish an ordinary space from missing output.
SQL SERVER – Find All The User Defined Functions (UDF) in a Database
A very simple script that lists all the User Defined Functions in a database, with schema name and type, by reading sys.objects in SQL Server.







