how to get ahead
Many people have ideas as to how to do well in life. Of course, many people do not even agree...
2012-12-05
1,638 reads
Many people have ideas as to how to do well in life. Of course, many people do not even agree...
2012-12-05
1,638 reads
ok, I'm going to keep this high level and simply share my opinion.
I am not prescribing anything.
If you want prescriptive...
2012-11-28
878 reads
My Dad died horribly three weeks ago in a fall after the power got knocked out during Hurricane Sandy. I...
2012-11-22
826 reads
@PsychzNetworks is spamming me non-stop. Every minute of every day.
I googled them and it seems Psychz Networks are famous for...
2012-11-21
1,502 reads
Boris Hristov shared this with me ages ago and I still haven't watched it yet (it is a few hours...
2012-11-20
2,474 reads
ok, everyone has their favorite SQL guru and favorite SQL tips. There are some people whose names you associate with...
2012-11-19
920 reads
I have heard it said that a former US President once remarked "People tell you who they are by their...
2012-11-16
662 reads
If you are a person inspired by ideas, you have probably encountered the concept of "fail fast". You probably also...
2012-11-15
686 reads
If anyone is a believer in solving challenges through sheer force of will, it's me. I'm a stubborn man and...
2012-11-14
716 reads
/*
here is a little script I've hobbled together that I use to get version and license info for a Red...
2012-11-13
1,150 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