Here is the answer to my puzzle on REPLICATE over 8000 characters, with a quick recap of the script and why the lengths come out the way they do.
SQL SERVER – How to use xp_sscanf in Real World Scenario?
I came across the extended stored procedure xp_sscanf and could not find a real world use for it. Here is how it works. Can you tell me where to use it?
SQL SERVER – Puzzle and Answer – REPLICATE over 8000 Characters
A quick Monday puzzle: what happens when you REPLICATE over 8000 characters into a VARCHAR(MAX) variable? Guess the lengths before you run it.
SQL SERVER – Recover the Accidentally Renamed Table
There is no undo for an accidentally renamed table in SSMS, sadly. Here are a few things you can check to find clues about what the original name was.
SQL SERVER – Solution – 2 T-SQL Puzzles – Display Star and Shortest Code to Display 1
A recap of my two T-SQL puzzles, the star from CAST(634 AS VARCHAR(2)) and the shortest code to display 1, after 350+ replies from readers.
SQL SERVER – Monday Morning Puzzle – Query Returns Results Sometimes but Not Always
A beginner asked why a query returns results sometimes but not always. I share where I would start looking and invite you to add your own answer.
SQL SERVER – Identifying Column Data Type of uniqueidentifier without Querying System Tables
Madhivanan asked how to tell if a table has a uniqueidentifier column without querying system tables or DMVs, knowing only the table name.





