MSSQLTips Kindle Giveaway
Want a legitimate chance to win an eBook reader like a Kindle? Would having it loaded down with eBooks on...
2011-01-25
824 reads
Want a legitimate chance to win an eBook reader like a Kindle? Would having it loaded down with eBooks on...
2011-01-25
824 reads
I'm speaking in context of Getting Things Done, not a legal or contractual agreement. What brought this up is me...
2011-01-24
794 reads
We're gearing up the advertising for SQL Saturday #70 since we're about 8 weeks out. In keeping with that, our...
2011-01-24
2,014 reads
We're finally getting a handle on things with the new baby. 🙂 As a result, I've started this weekly accumulation of...
2011-01-21
832 reads
Last year, Kevin Kline (blog | twitter) introduced me to Oracle and database expert, Bert Scalzo. Bert was looking to take...
2011-01-19
597 reads
When I first saw Andy Leonard's post about a new SQL People event, I was intrigued. It's not a training...
2011-01-13
2,501 reads
I know I missed out on the massive meme yesterday (T-SQL Tuesday #14), but I blame dealing with the weather...
2011-01-12
796 reads
I received my notice that I was renewed as a MIcrosoft MVP for SQL Server for 2011. It's a nice...
2011-01-01
782 reads
In previous years I had set goals and even if I didn't fully achieve them, they were helpful in giving...
2010-12-31
2,100 reads
I'm pleased to announce the latest addition to the Kelley family, a beautiful baby girl born at 11:56 PM last...
2010-12-21
713 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