Solving a slow running query issue with UNION
That’s right! I will solve a performance issue by adding a UNION into the query. Interested? Read on!
I recently encountered...
2015-03-09 (first published: 2015-02-25)
8,812 reads
That’s right! I will solve a performance issue by adding a UNION into the query. Interested? Read on!
I recently encountered...
2015-03-09 (first published: 2015-02-25)
8,812 reads
This morning Adam Machanic (blog | twitter) asked the following question on Twitter:
Anyone know if it's possible to configure PowerPoint 2013...
2015-03-04
683 reads
This month’s T-SQL Tuesday is hosted by Kenneth Fisher (blog | twitter) and its subject is about security.
Security is one of...
2015-02-18 (first published: 2015-02-10)
6,683 reads
I have the pleasure and privilege to announce that I was awarded with the “Author of the Year” award at...
2015-01-13
515 reads
As you might have realized, this is not the title of an Agatha Christie book, but rather about some nasty...
2015-01-09
770 reads
Just like last year, I’m a bit late with the obligatory “how was last year and what is this year...
2015-01-08
626 reads
Here is an overview of the articles I published in the last quarter of 2014.
INTENSE SCHOOL
MCSE Prep: Overview of T-SQL Windowing...
2015-01-07
524 reads
I recently published an article on MSSQLTips.com titled Format Durations in SQL Server Analysis Services. For those who haven’t read...
2014-12-22
708 reads
Just like last year, SQLServerCentral.com and Simple Talk are hosting the Tribal Awards. In their words:
The Tribal Awards, co-hosted by Simple-Talk and...
2014-12-18
853 reads
The recording of the webinar I did for the PASS BI virtual chapter is live!
(Quick reminder: it was the same...
2014-12-05
729 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