Deciding when to use functions or stored procedures depends on the caller and required work. I want examples behind that choice.
REGEXP_REPLACE Text Cleanup: Replacing Tags Is Not Parsing HTML
REGEXP_REPLACE can remove controlled tag-like text, but that is not the same as parsing HTML. Test quoted brackets, surviving script text and word boundaries before deciding whether the replacement fits the input.
SQL SERVER – Puzzle – Statistics are not Updated but are Created Once
A puzzle for you: auto update is on and I insert 10 times more rows, yet the statistics are not updated. Why, and how can they update automatically?
SQL SERVER – Creating All New Database with Full Recovery Model
A reader wanted every new database created with the full recovery model and was weighing policies, triggers and jobs. There is a much simpler solution.
CONVERT Date Styles: Use Explicit Numeric Formats
CONVERT date styles make date displays explicit. Keep the typed value for date logic and agree the output format with the receiving interface.
SQL SERVER – Puzzle – SELECT * vs SELECT COUNT(*)
SELECT * gives an error when run alone, but SELECT COUNT(*) does not. Why? Here is my SELECT * vs SELECT COUNT(*) puzzle from the Bangalore User Group.
OPENJSON Default Schema: Read Its Type Codes
OPENJSON default schema exposes key, value and type. Compare all six type codes, retain JSON null, and distinguish scalar text from nested fragments.






