The sqlcmd utility in SQL Server is a handy tool for running ad hoc queries or creating script files to perform routine tasks or automate procedures.
Building paging routines in SQL Server can be challenging since SQL wants to deal with full result sets. Adam Haines brings us a technique that you can use in SQL Server 2005 with the new Row_Number function.
Not every option in SQL Server is useful or appropriate. Brian Knight shows which ones you might not wish to mess with.
Fog Creek Software has a new headquarters and the offices look amazing. Steve Jones talks about the value of a beautiful space.
In the previous installment of our series covering the most relevant features of SQL Server 2005 Express Edition, we started an overview of Service Broker full dialog-level security. In this article, we will conclude this subject by describing the remaining prerequisites and a method to invoke a secure dialog.
Do you work in a great IT shop? Steve Jones talks about some of the things that make one and wonders if you feel you work at a great company.
Do you work in a great IT shop? Steve Jones talks about some of the things that make one and wonders if you feel you work at a great company.
Do you work in a great IT shop? Steve Jones talks about some of the things that make one and wonders if you feel you work at a great company.
In which Phil hears about an extra 'leap' second added over the new year, and broods on the missing INTERVAL datatype in SQL Server
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