I have SQL Server Management Studio v18.8 looking at a SQL Server 2019 database. When I right-click on a table in a Linked Server Object and choose to "Script table As Select To New Query Editor Window", then many of the columns are duplicated or triplicated.
For example, if my table has these four columns:
UNIT_ID
UNIT_NAME
UNIT_LOCATION
UNIT_LOCATED_DATE
Then the results will look like this:
SELECT [UNIT_ID]
,[UNIT_NAME]
,[UNIT_NAME]
,[UNIT_NAME]
,[UNIT_LOCATION]
,[UNIT_LOCATION]
,[UNIT_LOCATED_DATE]
,[UNIT_LOCATED_DATE]
,[UNIT_LOCATED_DATE]
,[UNIT_LOCATED_DATE]
FROM [MyLinkedObject]..[dbo].[UNIT_LOC]
GO
Is this a known bug? Is there a fix or workaround? I would really like to be able to create and run these scripts quickly, but I'm having to spend a lot of time deleting the repeated copies of the columns.