Do you use T-SQL debugging?
T-SQL debugging is not 100% in SQL Server. It has few bad drawbacks starting from difficulties when setting it up...
2011-07-13
1,214 reads
T-SQL debugging is not 100% in SQL Server. It has few bad drawbacks starting from difficulties when setting it up...
2011-07-13
1,214 reads
I was facing quite well-known issue today – I had to develop logic of duplicating (versioning) parent-child records. Because I was...
2011-07-12
2,102 reads
I continued to check SQL Server 2011 “Denali” for few things I dislike on 2008 R2 and tried to find...
2011-07-11
615 reads
While I was reading Martin Catherall’s post about Selecting from a table with no rows returned I remembered TABLESAMPLE function...
2011-07-11
1,387 reads
On my current project, I am dealing with date intervals in T-SQL very heavily. I’ve hit interesting issue recently – how...
2011-07-08
2,160 reads
I’ve received interesting question/requirement few days ago:
“… When viewing a query plan graphically, we usually have to hunt for the...
2011-07-08
1,666 reads
My wife and kids are leaving for holiday (without me). Bad thing is that I will miss them, good thing...
2011-07-07
1,294 reads
I’ve started to play little bit with SQL Server 2011 CTP Denali to find out whether some open wounds were...
2011-07-06
463 reads
I wrote about some skeletons in the Denali’s closet here. Let’s also put some good on the table. Very handy...
2011-07-06
1,210 reads
I’ve faced pretty common situation recently – you need to work with huge data during development/testing. It’s good if you have...
2011-07-05
2,572 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