T-SQL Tuesday #36 – Community
Chris Yates (@YatesSQL / blog) is hosting the T-SQL Tuesday blogging party this month, and he wants to know “What does...
2012-11-13
730 reads
Chris Yates (@YatesSQL / blog) is hosting the T-SQL Tuesday blogging party this month, and he wants to know “What does...
2012-11-13
730 reads
The Myth
One misconception that I see a lot deals with how data is stored in a clustered index. Specifically – is...
2012-10-21
8,129 reads
The Scenario:
You just restored a production database on a development server. You’ve told the developers that it’s restored, and you...
2012-10-03
2,706 reads
Hello? Mr. DBA? Have you got a moment?
So there you are, enjoying one of the few quiet moments of your...
2012-08-15
5,262 reads
Late last year, my life got strange. Well, it’s always been strange, so let’s just say it became stranger than...
2012-07-18
746 reads
The PASS Summit 2012 schedule has been released, and I’m proud to announce that I’ve been selected to present a...
2012-06-25
683 reads
Lately, I’ve been asked by several folks about the interview questions that I use when I interview candidates for SQL...
2012-06-15 (first published: 2012-06-11)
11,963 reads
ORM tools. They’re great. They’re evil.
In the right hands, used the proper way, they can be a very powerful, very...
2012-06-11
3,475 reads
Next up on the SQL Server 2012 Performance testing circuit: Gap Detection. You know, where you find missing values from...
2012-04-19
3,288 reads
This month, T-SQL Tuesday is being hosted by Nigel Sammy. Since the RTM of SQL Server 2012 just occurred, he...
2012-04-10
1,609 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