Putting Corrections in Perspective using Power BI
My enthusiasm for analyzing stock market data using Power BI – even after publishing two posts recently (this and this) – is at...
2015-10-13
551 reads
My enthusiasm for analyzing stock market data using Power BI – even after publishing two posts recently (this and this) – is at...
2015-10-13
551 reads
What’s my share? Calculating percent share of the total is a common need. Let’s see how to calculate this in Power BI...
2015-10-06 (first published: 2015-09-29)
24,927 reads
My article “SSIS Design Pattern – Staging Fixed Width Flat Files” is published on SQLServerCentral.com. In the article, I provide a...
2015-10-06
652 reads
There’s a saying that birds of the same feather flock together. When you throw your data on a scatter chart,...
2015-09-25 (first published: 2015-09-14)
3,087 reads
Let’s say you have a table that records transactions along with the date of when the transaction took place. Wait,...
2015-09-22
5,171 reads
When you start working in ETL (Extract, Transform, and Load) or SSIS projects, you’ll be faced with two basic terms:...
2015-09-16 (first published: 2015-09-08)
33,900 reads
U.S. stock markets have taken a beating this past week fueled by China markets. Take a look at how China and...
2015-09-02 (first published: 2015-08-24)
3,530 reads
About 80% of the world’s population lives in about 13% of the countries. Okay, this statement is not as knee-jerking...
2015-09-01
7,115 reads
S&P 500 index is an American stock market index consisting of 500 large companies and is considered to be the...
2015-08-17
2,671 reads
Blank values are annoying, anywhere and everywhere. If your source system contains them, here’s how to convert blank values to NULL in...
2015-08-11
15,619 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