T-SQL error handling with Try…Catch blocks
T-SQL Try…Catch block for SQL Server exception handling has new, improved functions to handle errors when executing T-SQL code in SQL Server 2005.
T-SQL Try…Catch block for SQL Server exception handling has new, improved functions to handle errors when executing T-SQL code in SQL Server 2005.
Most SQL Server DBAs will never need to read the registry for their instances, however in case you do find yourself needing to read or write something in SQL Server 2005, Vince Iacoboni brings us a technique for performing both of these actions.
Robyn and Phil decide to build an RSS newsfeed in TSQL, using the power of SQL Server's XML.
Improving SQL Server password management includes thorough password testing and securing SQL Server installations beyond the main database server.
A thought provoking article from SQL Server expert and trainer Andy Warren. As a DBA you should think about the rules and decrees you have developed over the years and revisit them for application in your current situation.
Steve Jones bimonthly car update looks at driving in the UK and the differences in cars between the US and elsewhere.
A web look up of a huge list of stock symbols from an MS SQL database.
Arranging SQL data that you can effectively analyse requires an understanding of how to use certain SQL clauses and operators. These tips will help you figure out how to build statements that will give you the results you want.
Software Development Innovations is offering SQLServerCentral.com members a 20% discount on their products with a coupon of "sqlservercentral" used in their cart.
This column is less about the mechanics of a common language runtime (CLR) feature and more about how to efficiently use what you’ve got at your disposal.
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