T-SQL Tuesday #168–Roundup
Last week was the 168th T-SQL Tuesday, which I hosted. The invitation is here. I didn’t get much of a chance to check out the posts as I was...
2023-11-21
26 reads
Last week was the 168th T-SQL Tuesday, which I hosted. The invitation is here. I didn’t get much of a chance to check out the posts as I was...
2023-11-21
26 reads
This is an article on How to write efficient TSQL. When it comes to composing T-SQL (Transact-SQL) code, there exist a multitude of vital considerations developers should bear in...
2023-11-20 (first published: 2023-11-06)
1,055 reads
After more than two years in development and six months in public preview, Microsoft Fabric is now generally available (GA). Here is the announcement made during Microsoft Ignite last...
2023-11-20
57 reads
Recently a customer was looking to automate some of their SQL Compare checks, but they wanted to do this in a dynamic way, since they needed to do this...
2023-11-20 (first published: 2023-11-08)
400 reads
vaucasy – n. the feat that you’re little more than a product of your circumstances, that for all the thought you put into shaping your believes and behaviors and...
2023-11-17
39 reads
One day, I shut down my computer, as I usually do nightly. This time, I shut it down on a Friday and turned it back on after a holiday...
2023-11-17 (first published: 2023-11-03)
189 reads
I get asked about Azure SQL very often. This is a topic that I’ve written about and taught many times. To be honest, this is a rather large topic...
2023-11-17 (first published: 2023-10-25)
420 reads
Morning from the PASS Data Summit! I will be live blogging the event again today, so check back for announcements and releases throughout the keynote. Today, we will dive...
2023-11-16
66 reads
The WIT panel spoke on an excellent topic today: needing, and finding, allies at work. Afterward and for the first […]
The post Women in Tech: Finding Allies #PASSDataSummit appeared...
2023-11-16
48 reads
I had someone ask this question recently and had to double check the syntax myself, so I thought this would make a nice SQL New Blogger post. Another post...
2023-11-15 (first published: 2023-10-30)
339 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