SSMS 18.6 Object Explorer Details view no longer working?

Naomi 7,361 Reputation points
2020-10-14T17:52:32.66+00:00

Hi everybody,

I want to confirm something. I believe I used to be able to highlight a table in SSMS, click F7 and bring its columns into separate window and then can highlight columns I need and drop them into code window.

I'm using the latest SSMS version and I don't have this ability anymore at all. When I click F7 (or do it from the menu), it brings a different type of window (Policy Health) and not the table I highlighted but for one I looked up few days before. My DB is huge and has lots of tables and other objects - could this be a reason?

I want to easily grab columns from the table and bring them to my code, but I don't seem to have this ability to do it visually. Of course, I can write some code to do it. Another annoying feature I found is that SSMS adds [] around columns and types in scripting, I have to run two replace statement every time to fix it.

Thanks in advance.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,292 questions
0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 24,566 Reputation points
    2020-10-14T18:56:19.22+00:00

    Hi @Naomi ,

    I want to easily grab columns from the table and bring them to my code

    You can do that by using the following two methods:

    • Drag-and-Drop Columns entry in the Object Explorer for any table.
    • Run for example, sp_help 'Person.Address'; in the Query window for any table of interest. Highlight the Column_Name column and drag it to the Query window or Ctrl+C/Ctrl+V anywehere.
    1 person found this answer helpful.
    0 comments No comments

  2. Erland Sommarskog 99,071 Reputation points MVP
    2020-10-14T21:34:21.7+00:00

    F7 certainly gives you Object Explorer Details. But you would need to navigate to the database and table. As Yitzak says, you can use the plain Object Explorer, which is easier than the Details, as it does not take up all the screen estate.

    Yes, the brackets that SSMS adds are irritating. I wish it would be smart to only do it when needed.

    1 person found this answer helpful.
    0 comments No comments

  3. Erland Sommarskog 99,071 Reputation points MVP
    2020-10-14T22:03:17.223+00:00

    It doesn't work for me. I highlight the table in Object Explorer and then press F7. It shows Policy Health for the table I used few days ago.

    What I wanted to say is that you get the Object Explorer Details and not any other window. But you get were you were the last time. I have never tried using it by pressing F7 with a certain object selected, so I don't know if it ever has worked that way.

    I don't like selecting columns in Object Explorer because it just puts everything in one line with all the columns (and I may want to not start from all of them).

    That is usually what people is asking for, so I assumed that you were too. I don't know what Object Explorer Details gives you in this regard. I was not really able to figure this out when I went there.

    I did a quick test with SSMS 17.9.1, and it did not really seem to be different.

    1 person found this answer helpful.
    0 comments No comments

  4. Naomi 7,361 Reputation points
    2020-10-14T19:47:33.997+00:00

    Thanks, Yitzhak. I wanted some specific columns - I think I used Object Explorer Details window before. Want to know if what I'm getting in that window now can be considered a bug or not.

    0 comments No comments

  5. Naomi 7,361 Reputation points
    2020-10-14T21:50:37.017+00:00

    Hi Erland,

    It doesn't work for me. I highlight the table in Object Explorer and then press F7. It shows Policy Health for the table I used few days ago.

    I don't like selecting columns in Object Explorer because it just puts everything in one line with all the columns (and I may want to not start from all of them).

    Not a big deal but for the things I'm working on right now (re-writing several stored procedures using similar pattern), I need a simple way of grabbing columns, having insert statements, etc. Right now I use Script table as, put that in clipboard, do multiple replaces to remove [] and change particular collation to 'DATABASE_DEFAULT' (e.g. lots of manual work and need to be very careful with column names, etc.)

    Thanks.

    0 comments No comments