Earlier today, I ran into an interesting “feature” in the SQL Server Management Studio (SSMS) Results Grid.
During development, I found what appeared to be duplicate data. Uh-oh! I spent three hours debugging my query, looking into the underlying ETL, and doing all kinds of tests. I absolutely could not figure out what was wrong!
Then it hit me. Maybe my query was fine? Maybe the problem was how the results were displayed in the SSMS Results Grid? I tried expanding the columns. And sure enough. There it was. All my data, perfectly fine.
After facepalming, I started laughing. One of my Norwegian phrases is “erre mulig!?” It roughly translates into an exasperated, humorous “how on earth is that possible!?” I kept laughing. And of course, I had to tweet about my fail of the day:
I received many replies with other fun stories, but also several replies saying that others had experienced the same behavior in SSMS recently. Hmm. I decided to look into it again. Maybe there was something more to this than just me being tired?
And sure enough, I could reproduce the behavior on my personal laptop.
SSMS Results Grid Not Showing Ellipses
When I execute a query, the column width appears to be set based on the first few rows that are displayed. Any data that is longer than the width of the column is not visible. Usually, this is indicated with an ellipsis (…) at the end of the column.
However, in my case, there were no visible ellipses! It looked like the column displayed all the data, and that made it look like I had duplicates. You can see a video of this below.
I tested SSMS 17.8 and 17.9 with both default and custom fonts and sizes, and experienced the same behavior in both.
Video of SSMS Results Grid Behavior
Stop rambling, Cathrine!
To sum it up: I will report this to the Microsoft SQL Server Client Tools team so they can look into it. Maybe this actually is one of those “features” that us regular folks call bugs :)
But if you have experienced this same behavior, wasted time debugging the wrong thing, and facepalmed… Don’t worry. It’s not just you! :D
Update: John G Hohengarten kindly let me know that there is already a UserVoice feedback item for this, which I had missed. Please vote! And thank you so much, John. I’m blind in several ways today ;)