Use LAG and LEAD for monthly comparisons, handle defaults and percent change, choose explicit frames, and detect status transitions.
JSON_OBJECT and JSON_ARRAY: Building JSON in SQL Server 2022
Build JSON_OBJECT and JSON_ARRAY values in SQL Server 2022, control null handling, nest arrays, and compare rowset and aggregate output.
Querying Nested JSON Arrays With OPENJSON
Query nested JSON arrays with OPENJSON, preserve element positions, pass inner arrays with AS JSON, and handle missing or strict paths.
Case-Insensitive and Multiline Regex Flags in SQL Server 2025
Your pattern passed the test string and then missed rows in the table. The flags and the line endings are the usual reason.
SQL SERVER – MySQL – PostgreSQL – How to Concat Strings?
How to concat strings the same way in SQL Server, MySQL and PostgreSQL? I switched from the plus operator to the CONCAT function, and here is why.
BASE64_ENCODE and BASE64_DECODE in SQL Server 2025
Use BASE64_ENCODE in SQL Server 2025, decode binary and text safely, compare URL-safe output, and replace older XML encoding expressions.
SQL SERVER – Building Three-Part Name from OBJECT-ID – Database Name, Schema Name, TableName
Have only an object_id? Here is a script to build the three-part name, database, schema and table, using DB_NAME, OBJECT_SCHEMA_NAME and QUOTENAME.






