Using a Staging Environment for Tracking Down Bugs
A discussion why having a staging environment with data that mirrors production is vital to tracking down issues.
Being able to...
2011-06-08
2,137 reads
A discussion why having a staging environment with data that mirrors production is vital to tracking down issues.
Being able to...
2011-06-08
2,137 reads
A discussion about nightly populated tables and how they have reduced SQL Server load.
What’s more important – speed or data accuracy/quality...
2011-06-05
1,293 reads
Why OR conditions in join statements should be avoided and an example fix.
OR conditions and join statements – some things just...
2011-06-03
2,811 reads
A discussion of how BPS uses a SQL exercise for candidates and why it is helpful.
At the Boston Public Schools,...
2011-06-01
2,711 reads
A followup to a post about subqueries with an estimation for how long it would take for the query to...
2011-05-30
3,452 reads
A discussion of how views give a more denormalized means for querying against normalized tables.
Ad-hoc reports are frequently requested at...
2011-05-28
844 reads
A discussion of how NEWID can be used to help randomize the results returned from a SQL query.
A scenario I...
2011-05-26
1,145 reads
A discussion of how joins significantly outperform subqueries and how this is more evident when OR conditions are involved.
SQL queries...
2011-05-25
949 reads
Thank you to everyone reading this site - Please enjoy your stay!
HelpWithSQL has hit double digits in posts! I hope everyone...
2011-05-24
616 reads
A discussion about SQL joins and subqueries with information about how to format join statements properly.
In any non-trivial task, developers...
2011-05-22
1,105 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