Veterans' Day
I'll post Part III of Becoming a DBA tomorrow (meaning there will be two posts). Veterans' Day is typically celebrated...
2007-11-12
618 reads
I'll post Part III of Becoming a DBA tomorrow (meaning there will be two posts). Veterans' Day is typically celebrated...
2007-11-12
618 reads
Work responsibilities took up my time on Thursday and Friday, so I never got around to posting. Here's the resources...
2007-11-11
621 reads
Apex SQL has announced a new version of Apex SQL Log as well as an API for it.
Release Notes...
2007-11-07
790 reads
Building upon my post from last Tuesday, if you know all the roles for a given user, you'll probably want...
2007-11-06
609 reads
I try my best to get things right the first time. So often, correcting a mistake or bad choice is...
2007-11-05
674 reads
This is a follow-up to part I from last week. You've considered what you want to do, you've looked at...
2007-11-05
912 reads
I've used Safari (the O'Reilly version) for a number of years now and it is a resource I often recommend...
2007-11-02
861 reads
As of SQL Server 2005, any database in 90 compatibility mode (settable by sp_dbcmptlevel) cannot support non-ANSI OUTER JOINs. Sometimes...
2007-11-01
2,172 reads
Some time ago I was looking for a password vault and came across some recommendations for KeePass. KeePass is open...
2007-10-31
2,598 reads
SQL Server 2005 introduces Common Table Expressions (CTEs), which are great for recursive queries. Previously, in order to do recursion,...
2007-10-30
2,569 reads
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
By Brian Kelley
If your organization is spending money, then meaningful results are a must. Pen testing...
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
Comments posted to this topic are about the item Answering Questions On Dropped Columns
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