Sorting a String as a Number with T-SQL and SSIS
I was working on a Cube in Analysis Services for a client recently and needed to sort on a field...
2012-01-23
3,748 reads
I was working on a Cube in Analysis Services for a client recently and needed to sort on a field...
2012-01-23
3,748 reads
With some calculated members in MDX it only makes sense to see the calculation if a certain Hierarchy is used....
2011-10-28
2,516 reads
Auditing in SSIS can be a real headache. In this two part series blog I am going to try to...
2011-10-20
3,577 reads
Auditing in SSIS can be a real headache. In this two part series blog I am going to try to...
2011-10-16
1,718 reads
SSIS packages are great ETL tools and can do just about anything you need in terms of ETL. Most organizations...
2011-10-03
1,259 reads
Data mining is a great way to help your company make decisions and predict future values. The Data Mining Algorithms...
2011-09-30
8,694 reads
There is no native function built in to SSIS to get the previous row in the data flow. But with...
2011-09-29
1,756 reads
Previously I wrote a blog on how to do a for each loop to look through each col in an...
2011-09-29
1,236 reads
The Merge component in SSIS will take two sorted sources and union them while maintaining the original sort order. The...
2011-09-28
1,315 reads
If you have a parent package that is looping through a set of files and calling child packages and want...
2011-09-27
2,708 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