I need to create a table from a remote db to a local db. To create the table on my local database, I need to aggregate and copy data from a remote server. I have read-only permission to the remote server. To connect to the remote server, I added a linked server to my local db. This is the query I’m using, but it is throwing an error. I think it can be one of two things:
1. I’m not calling the server right. Wrong syntax, perhaps.
2. SQL Server Express does not support copying data from a linked server.
SELECT ManagerName, string_agg (username, ',') AS Team
GROUP BY ManagerName