N Things Worth Knowing About CTEs
If you haven’t messed with them yet, you should know that CTEs (Common Table Expressions) - new in SQL Server 2005...
2010-08-26
1,292 reads
If you haven’t messed with them yet, you should know that CTEs (Common Table Expressions) - new in SQL Server 2005...
2010-08-26
1,292 reads
SELECT is this kind of Swiss Army Knife
SELECT is our bedrock, our foundation, our now-and-forever T-SQL multitasker…and it’s one of the...
2010-08-23
1,215 reads
Piggybacking tangentially off of Tim Mitchell’s (blog, Twitter) SSC editorial Turn a Bad Job into a Good Experience…yesterday I got...
2010-08-17
669 reads
One of the things about SSRS that irritates me is that in the graphical editor, you have to set the...
2010-08-13
1,931 reads
This has come up several times in the course of the last TWO jobs, so I’ll put it here for...
2010-08-12
760 reads
24HOP: Like Bacon for Chocolate
24 Hours of PASS is hip, it’s new…it’s serialized.
The September 15-16 24HOP is a sneak peek...
2010-08-11
680 reads
I’m absolutely positive that I’m not the first to blog on this topic, but I haven’t seen anyone else say...
2010-08-04
935 reads
…or, How I Learned to Stop Worrying and Love the Bomb
I had a SQL dev’s dream come to me via...
2010-07-28
904 reads
Hi! I’m SA! I’ll be your mentor during your stay at Innitrode! Actually, I’m everyone’s mentor here…anytime someone needs some...
2010-07-20
573 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