Implicit Conversion and Performance
Letting SQL Server change data types automatically can seriously impact performance in a negative way. Because a calculation has to be run...
2016-05-03
596 reads
Letting SQL Server change data types automatically can seriously impact performance in a negative way. Because a calculation has to be run...
2016-05-03
596 reads
August two years ago I originally posted, Make the PASS Summit Work for Your Employer. After conversations at several SQL...
2016-05-02
973 reads
Not all of us are going to use Azure in the same way. That’s just common sense. Therefore, not all...
2016-04-27
1,835 reads
For several years, many of us who were involved with working in Azure from the early days, were concerned that...
2016-04-21
525 reads
If you read the March PASS Board meeting minutes, you saw that there was a discussion around board members and...
2016-04-20
483 reads
Blog post #4 in support of Tim Ford’s (b|t) #iwanttohelp, #entrylevel
In SQL Server, in the T-SQL you use to query...
2016-04-19 (first published: 2016-04-12)
3,132 reads
I love presenting sessions because you get so many interesting questions. For example, what happens with Optimize for Ad Hoc...
2016-04-11 (first published: 2016-03-28)
1,931 reads
I’ve been getting lots of questions on views lately. Must be something in the water.
Because SQL Server allows you to...
2016-04-05
549 reads
THIS IS NOT AN APRIL FOOL POST!
Seriously.
My Speaker of the Month for April 2016 is Keith Tate (b|t) and his...
2016-04-01
492 reads
I offer instruction on the Azure Data Platform, and have for about six years, since shortly after it came out....
2016-03-29
813 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