2025-11-23
1 reads
2025-11-23
1 reads
This topic keeps coming up with my customers so the purpose of this blog post is to keep all the useful information in one post. Think of this post...
2024-10-23 (first published: 2024-10-09)
173 reads
Cosmos DB has become my latest focus and I hope to start sharing more about ways you can use it. Cosmos DB doesn’t provide the same granularity of query...
2023-11-29 (first published: 2023-11-15)
236 reads
So it’s about a week after SQL Saturday Chicago 2019. The event was amazing, tons of great people and in a great venue. Here’s the details of what happened...
2019-04-15 (first published: 2019-04-01)
606 reads
My presentation so far is really rough. I need to improve a lot before SQL Saturday Chicago! For now, the...
2019-03-20
1,013 reads
This is a trick I use in SQL Server Management Studio at least once a week.
Today’s scripts will be screenshots...
2019-03-18 (first published: 2019-03-02)
3,189 reads
This is a series I’m writing as I prepare for SQL Saturday Chicago 2019. My session is called Performance tuning...
2019-03-18
314 reads
I’m taking a brief break from daily blogging, even though it has been a ton of fun.
No excuses
I hope...
2019-03-11
223 reads
Happy Friday! We made it. Here’s something I came across while testing optimize for ad hoc for this week’s blog...
2019-03-11 (first published: 2019-02-22)
2,131 reads
Here’s some of my favorite community scripts and how I like to run them. If you haven’t tried the optional...
2019-03-09
674 reads
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
Comments posted to this topic are about the item Answering Questions On Dropped Columns
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers