Why do I contribute to the SQL Server Community?
As an active speaker and volunteer in the SQL Server community I am often asked why do I do it? ...
2010-10-12
534 reads
As an active speaker and volunteer in the SQL Server community I am often asked why do I do it? ...
2010-10-12
534 reads
You’ve seen the blog, you’ve downloaded the code…you even watched the 24HOP session recording…now own the Forgotten T-SQL Cheat Sheet!
Yessir,...
2010-10-11
1,426 reads
In SQL we are used to the GROUP BY and the type of result it produces. In real life, we...
2010-10-11
1,559 reads
I had a question recently about how budgets work at PASS, and I think that’s something worth sharing, so I’m...
2010-10-11
518 reads
Let’s be clear: I don’t recommend the use of xp_cmdshell as a general tool. It ought to be used when...
2010-10-11
17,373 reads
A while ago, I posted a blog on how one could perform running totals using Reporting Services and a user...
2010-10-11
4,394 reads
We’re conducting S–E–X Talk Week here at the MidnightDBA #Awesomesauce blog, in honor of everyone’s favorite subject. In deference to the...
2010-10-11
528 reads
A few months ago as I came across tab groups in SSMS and once I found them I was very...
2010-10-11
1,096 reads
I just wanted to update everyone on our event happening in NYC, November 20, 2010. We have just six weeks...
2010-10-11
547 reads
I searched the internet for “connect and forget”. Wonderbox.net offer is described as a “revolutionary computer server”… I think of wonderbox as a “computing appliance”, but Wikipedia limits the...
2010-10-10
10 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