An error occurred while writing an audit trace. SQL Server is shutting down
There was this incident at one of the clients in recent past. It was a nice morning. I was enjoying the tea of the day. I just started my...
2019-01-01
19 reads
There was this incident at one of the clients in recent past. It was a nice morning. I was enjoying the tea of the day. I just started my...
2019-01-01
19 reads
In my previous blog post I have talked about What is the Query Store and How to setup the Query Store. In this blog post today, I will explain...
2018-09-25
52 reads
Change is inevitable, it's natural. I would like to quote few lines from Shrimad Bhagavad Gita says Change is the...
2016-11-19
433 reads
For the years I have been watching the SQLPASS session recording and hearing that it's really a different experience to...
2016-11-06
478 reads
Since data consistency is a crucial aspect for every user, the server has in-built mechanism which helps to maintain the...
2016-09-01 (first published: 2016-08-23)
3,113 reads
SQL Server 2016 comes up with the new release of Master Data Services (MDS). In it, some new features have...
2016-07-28 (first published: 2016-07-25)
2,466 reads
Overview of the Situation
While accessing data files in SQL Server, many issues may occur that may lead to frustrating situation...
2016-06-30 (first published: 2016-06-24)
2,277 reads
SQLPASS SUMMIT 2016 is around, only few months left for this super event. Probably you all would have heard about...
2016-05-14
1,463 reads
Introduction
SQL Server is a database platform designed for providing large-scale transactions, e-commerce applications, data mining, etc. It is widely used...
2016-04-26
4,638 reads
Database Mirroring in SQL Server is deployed as a method to increase the availability of a SQL Server database in...
2016-04-05 (first published: 2016-03-25)
97,498 reads
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
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