The one bright spot in an otherwise bad day.
April 1st is a fun day for almost everyone. Playing tricks or just enjoying the tricks played by others. For...
2011-04-04
1,253 reads
April 1st is a fun day for almost everyone. Playing tricks or just enjoying the tricks played by others. For...
2011-04-04
1,253 reads
I read on lots of websites that the new hard drives will be moving to 4K sectors instead of the...
2011-02-03
1,744 reads
There is one thing that have been bothering me for quite some time. I thought I would blog about it....
2010-12-27
1,280 reads
So far I have seen lots of blogs about SQLPASS regarding the Slate for this years BoD. I do not...
2010-08-25
709 reads
Today twitter is buzzing with news about MVPs being confirmed. Some new and some old getting renewed. I am sure...
2010-07-01
568 reads
There was a time when almost every Chapter leader were asking PASS to find a place where the leaders can...
2010-05-21
389 reads
It all started with Grant Fritchey (Twitter @GFritchey) posting on THE THREAD asking everyone if they are interested in writing...
2010-05-07
820 reads
Where ever you read, people claim that power shell is so easy that even a dummy can do it. Really?...
2010-03-08
622 reads
I am a nervous wreck today. Tomorrow we will have the first International speaker for our user group. Jimmy may...
2010-02-17
732 reads
This is wonderful news to our new chapter. Jimmy May has agreed to come to give a presentation at our...
2010-01-26
688 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