Add table in MSSQL View is greyed out when using Azure DB

Cameron McIntosh 21 Reputation points
2021-05-01T12:20:44.99+00:00

Can someone please advise how to add a table to an MSSQL view? I right click the table viewer in which the Add table funtionality is greyed out. See screen shot.
93062-image.png

SQL Server | Other
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2021-05-01T17:34:51.833+00:00

    I tested this with SSMS 18.9.1 and connected to an Azure SQL DB, opened the View Designer, selected some tables. I then tried the context menu and Add Table was available.

    I also tried Viorel's hypothesis, and selected all tables initially, but Add Table was still active in the context menu (as it should be, because the same table may be added twice to a view.) I also tried a new database with nothing in it - the option was still available.

    Sometimes funny things happen in SSMS, I would try to close it and restart. I would also make sure that I have the most recent version which you can find at https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms.

    ...Or you can take a radical approach and scrap the View Designer altogether and just create the view from a query window. The View Designer is quite poor and there are many constructs in SQL it does not understand.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Cameron McIntosh 21 Reputation points
    2021-05-02T12:26:18.973+00:00

    thanks Erland.

    I was using version 17. Version 18 has fixed the issue.

    Cheers,

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.