Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

SSMS bug: missing ellipsis for truncated field values (Results to Grid)

This bug led me to think the values were different than actual ones: sometimes, when truncating values due to column width, SSMS 2017 (17.7) doesn't put ellipsis (…) in the end of the truncated value, and users are misled to think the value is not truncated.

29 votes
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)

We’ll send you updates on this idea

Alexandre Machado shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

13 comments

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...
  • Matt Benham commented  ·   ·  Flag as inappropriate

    Changed to Consolas (to match the default text editor font) and it does work around the issue. Thanks for the information.

  • AdminMicrosoft SQL Server (Product Manager, Microsoft Azure) commented  ·   ·  Flag as inappropriate

    I tried changing my Font for "Grid Results" from "Microsoft Sans Serif" to "Lucida Console" and the ellipsis showed up for any size rectangle < the text width. Try changing your grid to use a fixed width font to see if it resolves the issue for you until a fix is forthcoming.

  • Sofiat commented  ·   ·  Flag as inappropriate

    Hi @Microsoft,

    How soon is the planned update? It's becoming quite frustrating as there's the tendency to misread results.

  • Alexandre Machado commented  ·   ·  Flag as inappropriate

    Hey, @Microsoft! It is planned, but planned for when? Could you let us know when we may expect it to be done?
    Thank you.

  • Peter commented  ·   ·  Flag as inappropriate

    This is actually an issue introduced with the most recent update to Windows 10 (creators update), prior to that update to Windows 10 the ellipsis would be displayed.

    I say this becuase the exact same problem occurs in Windows Explorer with file extensions, when you reduce the Name column width so that the extension starts to get cut off it will not show the ellipsis until the filename is cut off.

  • Matt Benham commented  ·   ·  Flag as inappropriate

    This is also affecting us. You can replicate with the code below. The second half of the results automatically truncate the last digits, without an ellipsis. As David Mårtensson reported, where you expand the column length fully and then slowly contract the width of the column, the bug becomes apparent - at first the last two digits are lost together, then the third digit, and finally the fourth, at which point the ellipsis is added.

    --WITH C AS
    --(
    -- SELECT 1 AS Num
    -- UNION ALL
    -- SELECT Num + 1 AS Num
    -- FROM C
    -- WHERE C.Num < 1000
    --)

    --SELECT
    -- CASE WHEN C.Num < 500 THEN 10000 + C.Num
    -- ELSE 1000000 + C.Num
    -- END AS PRJ_ID
    --FROM C
    --OPTION (MAXRECURSION 0);

  • NateJ_CU commented  ·   ·  Flag as inappropriate

    Confirmed in SSMS 17.8.1 today. Affects numeric and text columns. Also echo what David said about the "only sometimes for some column-width & value-width combinations". Annoyingly inconsistent.

  • John G Hohengarten commented  ·   ·  Flag as inappropriate

    This *might* be related to font sizes. For example, I changed my grid results font size to higher than default. Hopefully that helps Microsoft narrow down the issue.

  • Alexandre Machado commented  ·   ·  Flag as inappropriate

    David Mårtensson - Yes, me too; such behavior is easily reproducible with text fields, where the last word isn't replaced by ellipsis but more than one word are.

  • David Mårtensson commented  ·   ·  Flag as inappropriate

    We had the same problem BUT only for some width.

    If we narrowed the column even further the ellipsis was displayed.

    So it seems the trigger for the ellipsis is not in sync with the hiding of chars.

    In our case we had 8 digit numbers and due to char width sometimes 5 was visible and sometimes 6.

    In this case it was 5 visible chars visible out of 8 with no ellipsis but narrowing the column so that only 4 could be displayed triggered the ellipsis.

Feedback and Knowledge Base