Random Blog Post Challenge
OK, for no particular reason at all or maybe because I had too much food at lunch or just because...
2017-03-02
395 reads
OK, for no particular reason at all or maybe because I had too much food at lunch or just because...
2017-03-02
395 reads
As someone who still actively pursues a career in technology, I’m a little on the older side. I got started...
2017-02-23
409 reads
One question constantly comes up; What should the Cost Threshold for Parallelism be? The default value of 5 is pretty...
2017-02-22 (first published: 2017-02-20)
2,485 reads
The news cycle seems to be dominated by discussion of politics. Regardless of where you fall on the political spectrum, the talk of politics is inescapable and is probably going to lead to you being displeased with your fellow man. Luckily, we work in IT, so we can avoid politics. BWA-HA-HA-HA-HA! Politics goes way beyond […]
2017-02-20
126 reads
I love the questions I get while I’m presenting because they force me to think and learn. The question in...
2017-02-14 (first published: 2017-02-07)
1,498 reads
I was asked if there was an easy way to export all the plans from cache to a .SQLPLAN file....
2017-02-13
861 reads
So, my blog got hacked. They edited the page where I thanked Rodney for all that he did. I had...
2017-02-06
439 reads
I’m working on securing the blog. Please stand by. Apologies for any inconvenience or confusion.
The post I have been hacked...
2017-02-05
598 reads
Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. This book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you find there to diagnose the most common causes of poor query performance, and so optimize your SQL queries, and improve your indexing strategy.
2017-02-02
19,126 reads
The power and capabilities of Azure SQL Data Warehouse are pretty amazing. However, it’s still basically SQL Server under the...
2017-01-25 (first published: 2017-01-18)
1,107 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