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.
Reading the SQL Server Error Log Properly
Read the SQL Server error log for startup details and incident context, filter it with T-SQL, and cycle files without losing needed history.
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.
SQL SERVER – Get Current Database Name
Need the current database name in a script? SELECT DB_NAME() returns the name of the database you are running the query in. It is a one line answer.







