Sub query pass through
Occasionally in forums and on client sites I see conditional subqueries in statements. This is where the developer has decided...
2013-03-26 (first published: 2013-03-22)
3,583 reads
Occasionally in forums and on client sites I see conditional subqueries in statements. This is where the developer has decided...
2013-03-26 (first published: 2013-03-22)
3,583 reads
On the weekend of the 9th March 2013, the second SQL Saturday in the UK occurred. A massive thank you...
2013-03-12
661 reads
Time does fly, and happy birthday SQL Lunch UK.
It has been a year since the first SQLLunch UK, and over...
2013-02-17
697 reads
As ive stated in the past, i’m presently part of a team on an ALM project for a major UK...
2013-02-12
4,105 reads
If you are anything like me, by know you will have a few thousand digital images spread across multiple directories...
2013-01-20
731 reads
As you may be aware, I have been running a lunch time user group ‘SQLLunch UK’ having stolen drawn inspiration...
2013-01-11
665 reads
Late in December, one the long awaited portions of functionality inside SSDT was released to an eager public, that being...
2013-01-07
1,755 reads
As I'm sure I must have mentioned in the past, I’m presently involved in a large ALM project at a...
2013-01-04
1,526 reads
As we are all aware, there are a number of traceflags. Some documented, some semi-documented and some completely undocumented. Here...
2012-12-06
991 reads
Many kudos goes to Jonathan and Annette Allen and the others on the team for confirming SQL Saturday 194 in...
2012-12-06
878 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...
Hi all, I just started using VS Code to work with DB projects. 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
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