External Article

How To Document Your PowerShell Library

PowerShell provides comment-based help for functions and scripts with Get-Help, but when you want to document modues or generate a complete indexed API in HTML format, just as you can with Sandcastle for .NET or javadoc for Java, then stronger magic is required. Michael Sorens shows you how it is done, with source code.

External Article

SQL in the City Seminar Sacramento 2013

Join Red Gate for a free a seminar on July 26 (the day before SQL Saturday Sacramento). SQL Server MVP experts, Steve Jones and Grant Fritchey will present sessions featuring best practices for SQL Server database development and deployment, in addition to showing Red Gate tools in action.

SQLServerCentral Editorial

Data Philanthropy

The idea of giving back to the world some of your success has been something many successful businesses have done forever. Steve Jones thinks they should consider giving more than physical resources, but also give data.

External Article

Encrypting and Decrypting SQL Server Stored Procedures, Views and User-Defined Functions

Some companies put business or application logic in SQL Server using stored procedures, views and functions to return values to the calling applications or perform tasks. This is not unusual in companies that use the SQL Server layer to perform business tasks, such as finance operations, or incorporate application functionality into the programmability layer. Here's a tip to preserve secrecy on some procedures, views or functions in order to maintain security.

Blogs

Optimising Costs: Strategies for Efficient Cloud Resource Management

By

Over time, I’ve realised that one of the hardest parts of cloud management isn’t...

Cost Visibility: Tracking and Analysing Your Cloud Spend

By

One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...

Whiling away an afternoon, thinking

By

I come to Heathrow often. Today is likely somewhere close to 60 trips to...

Read the latest Blogs

Forums

Fun with JSON II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Fun with JSON II

Changing Data Types

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Changing Data Types

Answering Questions On Dropped Columns

By Cláudio Silva

Comments posted to this topic are about the item Answering Questions On Dropped Columns

Visit the forum

Question of the Day

Fun with JSON II

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