A guest editorial from Phil Factor that discusses ORMs and how they ca be used, or mis-used, in our applications.
I recently posted a couple of scripts that backup all databases on your SQL Server instance to disk with a...
Learn how to use the SQL Server 2008 catalog view and dynamic management view to access the audit details of existing server and database level audits.
Replication is a great technology for moving data from one server to another, and it has a great many configuration options. David Poole brings us a technique for scaling out with multiple distribution databases.
With Steve Jones on vacation, we reprint on of his more popular editorials from the past. This was originally published on Feb 14, 2005.
Part III of the Oracle / SQL Server comparison looks at the configuration options for each database, their storage options as well as the startup and shutdown procedures.
I had a question today about why it was “bad” to use a UniqueIdentifier as the data type for a...
This article describes how to Evaluate Policies on Multiple Instances using EPM and PowerShell.
Spatial support is coming to SQL Azure soon, and Steve Jones thinks about how the service could improve this support.
By Steve Jones
This month we have a new host, Meagan Longoria, who graciously agreed to help...
By Steve Jones
I’m at the UK Redgate office today, meeting with senior leaders in all areas...
Optimizing Azure SQL Database performance often begins with identifying the most resource-intensive queries. Understanding...
I’ve been learning more about the google knowledge panel and it seems like one...
I’m currently researching the best wireless credit card terminal for a growing business and...
Comments posted to this topic are about the item Creating a JSON Document IV
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT YearEstablished, json_objectagg(city : TeamName) FROM dbo.NFLTeams GROUP BY YearEstablished;See possible answers