T-SQL Tuesday #121: Gifts received for this year
At the end of 2019, Mala (b|t) invites us to write about the gifts we’ve gotten during the year. I’ve been gifted with a lot of things this year personally...
2019-12-10
5 reads
At the end of 2019, Mala (b|t) invites us to write about the gifts we’ve gotten during the year. I’ve been gifted with a lot of things this year personally...
2019-12-10
5 reads
After nearly a year of work, starting with the proposal that I finished writing in a hospital last year the book is finished and off to be published and...
2019-10-02
43 reads
After nearly a year of work, starting with the proposal that I finished writing in a hospital last year the book is finished and off to be published and...
2019-10-02
2 reads
After nearly a year of work, starting with the proposal that I finished writing in a hospital last year the book is finished and off to be published and...
2019-10-02
5 reads
This month’s topic is wide open to anything you could think of that had to do with SQL on Linux from something technical on how to implement it or...
2019-07-17
30 reads
This month’s topic is wide open to anything you could think of that had to do with SQL on Linux from something technical on how to implement it or...
2019-07-17
12 reads
This month’s topic is wide open to anything you could think of that had to do with SQL on Linux from something technical on how to implement it or...
2019-07-17
3 reads
Hey look who is hosting T-SQL Tuesday, it is me, and I’m late. Sorry I broke my demo machines for Linux and had to set up everything again so...
2019-07-12
21 reads
Hey look who is hosting T-SQL Tuesday, it is me, and I’m late. Sorry I broke my demo machines for Linux and had to set up everything again so...
2019-07-12
6 reads
Hey look who is hosting T-SQL Tuesday, it is me, and I’m late. Sorry I broke my demo machines for Linux and had to set up everything again so...
2019-07-12
7 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