SSMS Tips - Text Results

  • Comments posted to this topic are about the item SSMS Tips - Text Results

  • Nice one, thanks Steve
    Use this regularly...

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Or more commonly "the shortcut you least expected and now can't remember how to undo this because you're trying to find the output format in the View menu and not in the Query menu"

    One point people may not appreciate is that this setting affects the next run of the query, it does not affect the current view. As a result pressing Ctrl-T or Ctrl-D has no effect and there is no UI feedback that anything has happened (poor UI design).

  • I knew about ctrl-T but looked up ctrl-shift-T in case that was a modification to switch "quickly" (as the question said) instead of waiting for the next query.

    I had not heard of ctrl-shift-T. It's very interesting but not sure how much I would ever use it to switch words around.

  • timwell - Tuesday, March 28, 2017 7:25 AM

    I knew about ctrl-T but looked up ctrl-shift-T in case that was a modification to switch "quickly" (as the question said) instead of waiting for the next query.

    I had not heard of ctrl-shift-T. It's very interesting but not sure how much I would ever use it to switch words around.

    It can be useful in testing queries with different values. In the following snippet, for example,
    WHERE ID = 1 --2
    if you position the cursor just after the 1 and press CTRL-Shift-T, it will swap the 1 and the 2, but leave the -- in place, giving you
    WHERE ID = 2 --1
    allowing you to quickly swap out values to test with.

  • sknox - Tuesday, March 28, 2017 9:32 AM

    timwell - Tuesday, March 28, 2017 7:25 AM

    I knew about ctrl-T but looked up ctrl-shift-T in case that was a modification to switch "quickly" (as the question said) instead of waiting for the next query.

    I had not heard of ctrl-shift-T. It's very interesting but not sure how much I would ever use it to switch words around.

    It can be useful in testing queries with different values. In the following snippet, for example,
    WHERE ID = 1 --2
    if you position the cursor just after the 1 and press CTRL-Shift-T, it will swap the 1 and the 2, but leave the -- in place, giving you
    WHERE ID = 2 --1
    allowing you to quickly swap out values to test with.

    Now that is useful. I hadn't played with it and figured the -- would switch too.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR - Tuesday, March 28, 2017 11:08 AM

    sknox - Tuesday, March 28, 2017 9:32 AM

    timwell - Tuesday, March 28, 2017 7:25 AM

    I knew about ctrl-T but looked up ctrl-shift-T in case that was a modification to switch "quickly" (as the question said) instead of waiting for the next query.

    I had not heard of ctrl-shift-T. It's very interesting but not sure how much I would ever use it to switch words around.

    It can be useful in testing queries with different values. In the following snippet, for example,
    WHERE ID = 1 --2
    if you position the cursor just after the 1 and press CTRL-Shift-T, it will swap the 1 and the 2, but leave the -- in place, giving you
    WHERE ID = 2 --1
    allowing you to quickly swap out values to test with.

    Now that is useful. I hadn't played with it and figured the -- would switch too.

    +1 (with thanks to Steve)

  • The question was about something I knew about, but the ctrl-shift-t is new to me.  Thanks for the discussion.

  • Ed Wagner - Wednesday, March 29, 2017 6:02 AM

    The question was about something I knew about, but the ctrl-shift-t is new to me.  Thanks for the discussion.

    Same here, I'm going to play with this functionality, and possibly change how I format the testing of test scripts as a result.

  • n.ryan - Tuesday, March 28, 2017 2:12 AM

    Or more commonly "the shortcut you least expected and now can't remember how to undo this because you're trying to find the output format in the View menu and not in the Query menu"

    One point people may not appreciate is that this setting affects the next run of the query, it does not affect the current view. As a result pressing Ctrl-T or Ctrl-D has no effect and there is no UI feedback that anything has happened (poor UI design).

    There is UI feedback if you have the SQL Editor toolbar displayed.  Admittedly, it's easy to miss, but it is there.

    I don't know how many times I've hit Ctrl-T to open a new tab in my browser only to realize that SSMS is the active window.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • use this shortcut accidently all the time, too used to using it for a new tab in Firefox, which my brains translates to "new Query tab" in SSMS every now and then >_<

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply