T-SQL Tuesday #125 – Unit testing databases – we need to do this!!
Welcome to the first April edition of T-SQL Tuesday. I’m honoured to be hosting it and have picked a topic that is near and dear to me. If you...
2020-04-07
54 reads
Welcome to the first April edition of T-SQL Tuesday. I’m honoured to be hosting it and have picked a topic that is near and dear to me. If you...
2020-04-07
54 reads
The annual PASSion Award is the highest accolade given to a PASS volunteer. Presented during the annual PASS Summit conference, this award recognizes an individual’s exemplary service and commitment...
2020-04-01
121 reads
Currently we have have the COVID-19 pandemic sweeping the world. Here in New Zealand we are currently in lockdown – what this means is that we Kiwis are required...
2020-03-31
96 reads
This article is about my own experiences in making my user group and community events more inclusive for people from diverse backgrounds. I am going to use growing my...
2020-04-10 (first published: 2020-03-31)
859 reads
Hi, I’m Hamish Watson and I am running for the PASS Board of Directors: https://www.pass.org/Governance/Elections.aspx This blog post is why I decided to run for the board, why I...
2019-11-06
22 reads
So I started blogging in 2016: So why blog….now? It is very interesting going back and reading that first blog post. It was mostly thanks to my late great...
2019-10-21
28 reads
This blog post is how to get git going after upgrading to Catalina (10.15). I use git as a method of storing all my presentations and work files. It...
2019-10-19
1,776 reads
This blog post is about the situation where after upgrading to the latest macOS version 10.15 – also known as Catalina – you may not be able to share...
2019-10-18
57 reads
This blog post is around the changing landscape of both SQL Server and the people who are our trusted guardians of it – DBAs. If you have been involved...
2019-07-22
285 reads
So in January I wrote a blog post on some goals I had this year: Some of my goals for 2019 It’s now July – how are things going?...
2019-07-19
14 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
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