I’m speaking at the first ever SQL Saturday San Antonio on 8/13/16!
San Antonio is such a great city with a lot to see and do, such as the Alamo and the...
2016-07-23
365 reads
San Antonio is such a great city with a lot to see and do, such as the Alamo and the...
2016-07-23
365 reads
I was recently browsing www.myplates.com and I’ll say it’s actually quite fun to see what plates people have randomly bought....
2016-07-21
590 reads
Have you ever tried to query the contents of the default trace and then spent more time trying to figure...
2016-07-18
469 reads
If you’re in Louisiana or Texas this is one SQL Saturday you won’t want to miss. This annual event is...
2016-07-18
304 reads
I’ve been using Microsoft’s cloud database for some time now. I’ve had a few customers with various performance problems and...
2016-07-15
2,201 reads
With less than we week away, I can say that I’m really excited to reach more people in the community...
2016-07-08
393 reads
For those of us in the US, it’s our day of independence. A day that stands for FREEDOM and happiness....
2016-07-05
1,609 reads
Over the years I have come to see that every database has what I call data type drift. Simply put,...
2016-07-13 (first published: 2016-06-28)
2,506 reads
Security is a vital component of data security. In today’s day and age it is imperative to think about security....
2016-07-04 (first published: 2016-06-24)
1,613 reads
I was recently doing some work on my Windows 10 desktop and placed a drive on one of the slower...
2016-06-30 (first published: 2016-06-23)
1,631 reads
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...
By Brian Kelley
If your organization is spending money, then meaningful results are a must. Pen testing...
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