An increased opportunity. Remote user groups. : T-SQL Tuesday #148
Rie Merritt (blog|twitter) is our host this month for T-SQL Tuesday! She’d like us to give advice on running a ... Continue reading
2022-03-08
5 reads
Rie Merritt (blog|twitter) is our host this month for T-SQL Tuesday! She’d like us to give advice on running a ... Continue reading
2022-03-08
5 reads
The other day a friend of mine mentioned that they were questioned on one of the scripts they ran recently ... Continue reading
2022-03-03
278 reads
The other day a friend of mine mentioned that they were questioned on one of the scripts they ran recently ... Continue reading
2022-03-03
19 reads
Please write the following on the chalk board 100 times. Queries should be readable!Queries should be readable!Queries should be readable!Queries ... Continue reading
2022-03-01
22 reads
Please write the following on the chalk board 100 times. Queries should be readable!Queries should be readable!Queries should be readable!Queries ... Continue reading
2022-03-01
5 reads
This is one of those things that when I look back on it seems really obvious. Note: If at the ... Continue reading
2022-02-25 (first published: 2022-02-10)
725 reads
I’m working on a new presentation titled Watch Ken solve security headaches in SQL Server. In this presentation I’m going ... Continue reading
2022-02-24
4 reads
I’ll be honest, I don’t remember if I’ve written about this before but I couldn’t find it, so here we ... Continue reading
2022-02-22
4 reads
I haven’t been blogging as much recently as I’d like and I’m trying to get back into it. One excellent ... Continue reading
2022-02-18 (first published: 2022-02-09)
233 reads
Well, it’s a new year and a new start, even if I am a bit behind the start of the ... Continue reading
2022-02-11 (first published: 2022-02-02)
364 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