PowerShell to Test a Query
So you want to do some tuning, but you’re not sure how to test a query on it’s performance. Not...
2016-11-23
1,356 reads
So you want to do some tuning, but you’re not sure how to test a query on it’s performance. Not...
2016-11-23
1,356 reads
As a concept, SQL Server on Linux is thrilling. Due to this, the OS doesn’t stand in the way of...
2016-11-22
634 reads
Different people approach their career in different ways. My working assumption, all the time, is that I don’t know enough...
2016-11-18
432 reads
I recently wrote an introductory post about the importance of statistics. I just received a reinforcement on how important they...
2016-11-10 (first published: 2016-11-03)
1,221 reads
I know that more and more of you are moving more and more resources into the Azure Data Platform. In...
2016-11-09
610 reads
A performance tuning tip I saw recently said, “Views don’t perform as well as stored procedures.”
<sigh>
Let’s break this down, just...
2016-11-09 (first published: 2016-11-01)
3,712 reads
Monday
I got in on Sunday and chose to have a small dinner with a couple of friends, quiet, preparing.
Monday was...
2016-11-08
428 reads
This requires an immediate caveat. You should absolutely be using sp_executesql over any type of non-parameterized execution of T-SQL. You...
2016-11-07
1,202 reads
Today we have a guest editorial from Grant Fritchey that looks at emotions and how they can affect our decision making.
2016-10-28
108 reads
SQL Cruise offers a number of unique opportunities for everyone involved, including speakers and sponsors. I’ve written before, severaltimes, about...
2016-10-28 (first published: 2016-10-18)
1,134 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