SQL Saturday
I've just received notice that I will be a presenter at the upcoming SQL Saturday event in Jacksonville, Florida. I'll...
2008-03-30
1,530 reads
I've just received notice that I will be a presenter at the upcoming SQL Saturday event in Jacksonville, Florida. I'll...
2008-03-30
1,530 reads
There has been a great deal of wailing and gnashing of teeth regarding the scuttlebutt that SP2 will be the...
2008-03-12
703 reads
This weekend, I had the unique opportunity to donate some time to a worthwhile charity organization. Through the efforts of...
2008-01-21
841 reads
It seems that I keep inheriting old systems that provide a singular, albeit mission critical, function to their owners. In...
2008-01-09
538 reads
After putting it off for six months, I finally took - and passed - 70-431 yesterday. I know, I'm probably one of...
2007-11-25
1,437 reads
I'm rarely a "needy" guy, but I have to admit that I'm feeling a little left out. Due to project...
2007-09-23
1,447 reads
If you've spent much time at all reading Steve Jones's blog posts and SSC editorials, you quickly glean that he...
2007-07-12
1,485 reads
It's been quite a week at the Gartner Application Development and Integration converence here in Nashville. I've never been to...
2007-06-13
2,003 reads
When you have an hour to spare, jump over and view this useful discussion about errors and exceptions in SQL...
2007-05-21
1,447 reads
Today, Microsoft released Service Pack 2 for SQL Server 2005. Though mostly a series of fixes for minor issues, there...
2007-02-19
1,426 reads
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...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
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