question

TomBurke-9985 avatar image
0 Votes"
TomBurke-9985 asked EchoLiu-msft edited

How do I Group by [Server Name] using Registered Servers?

I am using Registered Server Groups and would like to do a query across the servers.
Something like:

Select [Server Name], Count(*) as People
From ClientList
Group by [Server Name]
Order by [Server Name]

But I receive an error "Invalid column name 'Server Name'."


azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NavtejSaini-MSFT avatar image
0 Votes"
NavtejSaini-MSFT answered

@TomBurke-9985 Can you please check this document to run this queries with @@servername included to get this detail.

Regards
Navtej S


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.