A one line DATEADD query to find the last day of month for any date. It handles leap years: February 2008 gives the 29th and 2007 the 28th.
SQL SERVER – Math Functions Available in SQL Server
One list of the Math Functions available in SQL Server, from ABS and CEILING to SQRT and TAN, and why RAND is the only nondeterministic one among them.
SQL SERVER – Binary Sequence Generator – Truth Table Generator
A script that builds a 512 row truth table with its decimal value and binary sequence, using CROSS JOINs on a bit table. Add or remove joins to resize it.
SQL SERVER – Query to Find First and Last Day of Current Month – Date Function
One query to find the First and Last Day of Current Month in SQL Server, plus the last day of the previous month and the first day of the next.
SQL SERVER – UDF – Function to Parse AlphaNumeric Characters from String
UDF_ParseAlphaChars keeps only the alphanumeric characters in a string and strips everything else using PATINDEX and STUFF. A handy function, with a test.
REGEXP_LIKE in SQL Server 2025: Validating Codes, Emails and Phone Numbers
Validate codes, email shapes and phone numbers with REGEXP_LIKE in SQL Server 2025, using clear patterns and CHECK constraints.







