T-SQL Tuesday 89 - The times they are a changing!
T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called...
2017-04-11
385 reads
T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called...
2017-04-11
385 reads
If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded...
2017-03-27
307 reads
Another great teaching opportunity landed in my lap this week. I got an email from a coworker looking for some...
2017-03-09 (first published: 2017-03-01)
3,373 reads
Another great teaching opportunity landed in my lap this week. I got an email from a coworker looking for some...
2017-03-08
440 reads
2017-03-03
Just wanted to put a quick post out there for the people who follow me. I very recently made a...
2017-03-03
346 reads
This is something that has caused me some grief in my life as a DBA. I hesitate to call it...
2017-02-08 (first published: 2017-02-03)
9,461 reads
This is something that has caused me some grief in my life as a DBA. I hesitate to call it...
2017-02-03
409 reads
Shout out to Kenneth Fisher (b|t) for hosting this month's #tsql2sday. This month is about backup and recovery and here...
2016-12-13
405 reads
Shout out to Kenneth Fisher (b|t) for hosting this month's #tsql2sday. This month is about backup and recovery and here...
2016-12-13
275 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