Avoiding Unexpected Results with DATEDIFF in Year Comparisons
Learn how to avoid unexpected results when using the DATEDIFF function to find the difference between two dates in years.
Learn how to avoid unexpected results when using the DATEDIFF function to find the difference between two dates in years.
Phil Factor argues that the ability to write simply and expressively is a much under-valued skill in IT, and explains the main traps to avoid.
Steve asks the question today of how you might measure downtime and the scope you are concerned about.
With SQL Server now supported on Linux, traditional SQL Server DBAs will need to learn how to work with Linux, and Linux administrators will need to learn how to work with SQL Server. Fortunately, there are several tools available to assist. In this article Prashanth Jayaram describes how to work with the DMV tool which treats queries as files.
Learn how you can execute a PowerShell script via the SSIS execute process task.
Today we have a guest editorial from Derik Hammer that reminds us that there isn't one solution that will fit all your solutions.
A myriad of laws regulate data retention and generally compete with each other. William Brewer provides an introduction to the principles, but gives good advice -- leave the details to the specialists.
Siddharth Mehta looks at how and why to use Sankey charts and how this can be done in Power BI Desktop.
This whitepaper explores the differences between the approaches, state based or migrations based, and how Redgate tools can help.
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
hi everyone I am not sure how to write the query that will produce...
Comments posted to this topic are about the item Rollback vs. Roll Forward
Comments posted to this topic are about the item Foreign Keys - Foes or...
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 *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers