T-SQL Tuesday #120 – What were you thinking? – Invitation
In this month's T-SQL Tuesday, I want to know about things that you have seen someone do in SQL Server that has left you wonder "What were you thinking?"
The...
2019-11-05
15 reads
In this month's T-SQL Tuesday, I want to know about things that you have seen someone do in SQL Server that has left you wonder "What were you thinking?"
The...
2019-11-05
15 reads
In this month's T-SQL Tuesday, I want to know about things that you have seen someone do in SQL Server that has left you wonder "What were you thinking?"
The...
2019-11-05
10 reads
You can now run SQL Server on Linux. With it being easy to install / update, and running exactly the same as in Windows, it is my choice for...
2019-07-13
30 reads
You can now run SQL Server on Linux. With it being easy to install / update, and running exactly the same as in Windows, it is my choice for...
2019-07-13
11 reads
There’s a lot that goes on in June. From the 75th anniversary of D-Day, Fathers Day, to the official start of summer (though it feels like it already!)....
2019-06-28 (first published: 2019-06-11)
232 reads
There’s a lot that goes on in June. From the 75th anniversary of D-Day, Fathers Day, to the official start of summer (though it feels like it already!)....
2019-06-11
8 reads
In the Richmond, VA area, I am the organizer for our SQL Saturdays. Among other jobs that this entails, this also means that I am working with SQLSaturday SpeedPASSes....
2019-05-21
52 reads
In the Richmond, VA area, I am the organizer for our SQL Saturdays. Among other jobs that this entails, this also means that I am working with SQLSaturday SpeedPASSes....
2019-05-21
7 reads
In the Richmond, VA area, I am the organizer for our SQL Saturdays. Among other jobs that this entails, this also means that I am working with SQLSaturday SpeedPASSes....
2019-05-21
7 reads
I recently published a post detailing the new Scalar UDF Inlining feature in SQL 2019 here. That post introduced the...
2019-03-26 (first published: 2019-03-11)
647 reads
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
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...
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