A lack of foreign keys – a bad culture example.
G’day,
One of the things that I’ve been seeing more often than I would like to lately is large databases with...
2020-03-03 (first published: 2018-10-28)
3,193 reads
G’day,
One of the things that I’ve been seeing more often than I would like to lately is large databases with...
2020-03-03 (first published: 2018-10-28)
3,193 reads
TweetG’day,
Recently I’ve become quite interested in the latest incarnation of Azure SQL Database.
For those that are unaware of some of...
2020-03-03 (first published: 2015-01-27)
6,535 reads
TweetG’day,
Sometimes I come across what I call unusual coding practices. Developers usually have pressure on them to deliver and this...
2020-03-03 (first published: 2012-09-10)
2,386 reads
G’day,
I been asked a few times lately the best way to generate INSERT statements.
I’d always replied to use SSMS.
I know...
2020-03-03 (first published: 2019-02-02)
2,551 reads
TweetG’day All,
While I was writing my last blog post about the new SQL SERVER 2012 CHOOSE statement, it also came...
2020-03-03 (first published: 2014-02-18)
13,689 reads
TweetG’day,
Are people familiar with the saying “If there’s an elphant in the room, introduce it“? – if not, then to sum...
2020-03-03 (first published: 2014-03-19)
5,436 reads
Over the course of the next few weeks there are some significant events taking place that reflect technologies on the Microsoft data platform and beyond. Thursday 13th and 14th...
2020-02-12
49 reads
2020-02-02
9 reads
G’day, Looking back, perhaps one of the (many) mistakes that I’ve made in my career was to initially ignore the N0SQL movement. I’ve focused my career on Relational Database...
2020-01-27
20 reads
Melbourne Event – Monday 17th June 2019 (Free – including lunch and prizes) PASS, in conjunction with Microsoft, Intel and community leaders are offering free training on Moving to...
2019-06-06
6 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