Blog Posts

Blog Post

New Blog Space

I've decided to move my blog here. You'll see some old content being uploaded in the next few days. Look around, I hope you find some tidbits of information.
Older...

2022-10-17

25 reads

Tales From The Field Weekly Wrap Up

 Hello Dear Reader!
It's been a while.  I've been busy working with a few colleagues on our show Tales from the Field.  This has been a learning experience.  
I've had to...

2022-10-17 (first published: )

146 reads

Blog Post

DevOps From Redgate

In a few weeks at the PASS Data Community Summit, I’ll be joining several other Redgaters to put on an all-day precon where we take you on a database...

2022-10-14 (first published: )

115 reads

Blogs

How to Connect to SQL Server When Nothing Else Works – DAC

By

It's 2 AM. Your phone is going off. Users can't connect to the application,...

Get a Range of Sequence Values: #SQLNewBlogger

By

I discovered a procedure recently that I wasn’t aware of: sp_sequence_get_range. This post looks...

The Agent Era: When “How do I…?” Replaces “Where do I click?”

By

After a year away getting to grips with AI and its application across the...

Read the latest Blogs

Forums

data compare between 2 tables with same structure for any changes after etl run

By syam.tunuguntla

i have huge table with lot of data and is also wide. i took...

Creating a JSON Document II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Creating a JSON Document II

Backing Up Azure Key Vault EKM Key: Stairway to TDE Level 6

By VishnuGupthanSQLPowershellDBA

Comments posted to this topic are about the item Backing Up Azure Key Vault...

Visit the forum

Question of the Day

Creating a JSON Document II

I want to create a JSON document that contains data from this table:

TeamID TeamNameCity         YearEstablished
1      Cowboys  Dallas       1960
2      Eagles   Philadelphia 1933
3      Packers  Green Bay    1919
4      Chiefs   Kansas City  1960
If I run this code, what document(s) is/are returned?
SELECT json_objectagg( n.city : n.TeamName)
FROM dbo.NFLTeams;

See possible answers