|
|
|
|
|
|
|
| Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Identities and Sequences V | |
| When thinking about the identity property and sequence objects, which of these can generate values before an insert statement is executed? | |
Think you know the answer? Click here, and find out if you are right. | |
| Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Creating a JSON Document I I want to create a JSON document that contains data from this table: TeamID TeamName City YearEstablished 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 If I run this code, what is returned? SELECT json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
Answer: {"Team":"Cowboys","Team":"Eagles"} Explanation: This returns a single document with the data from the rows aggregated as separate key:value pairs. Ref: JSON_OBJECTAGG() - https://learn.microsoft.com/en-us/sql/t-sql/functions/json-objectagg-transact-sql?view=sql-server-ver17 |
| Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
| Editorials |
| Poor Names - Comments posted to this topic are about the item Poor Names |
| Don't Panic - Comments posted to this topic are about the item Don't Panic |
| Acting with Confidence - Comments posted to this topic are about the item Acting with Confidence |
| Barely Reviewed Code - Comments posted to this topic are about the item Barely Reviewed Code |
| Article Discussions by Author |
| Removing TDE - Comments posted to this topic are about the item Removing TDE |
| The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI - Comments posted to this topic are about the item The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI |
| Creating a Simple and Flexible Random Password Generator in SQL Server - Comments posted to this topic are about the item Creating a Simple and Flexible Random Password Generator in SQL Server |
| SQL Art, Part 3: Happy Easter Fun in SSMS - Comments posted to this topic are about the item SQL Art, Part 3: Happy Easter Fun in SSMS |
| Identities and Sequences IV - Comments posted to this topic are about the item Identities and Sequences IV |
| Using OPENJSON - Comments posted to this topic are about the item Using OPENJSON |
| Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform - Comments posted to this topic are about the item Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform |
| Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform - Comments posted to this topic are about the item Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform |
| SQL Server 2022 - Administration |
| SQL 2017 to SQL 2025. Good to Go ? - We need to replace our Windows server running SQL 2017. Any reason not to go to SQL 2025 ? Any "gotchas" migrating databases from SQL 2017 to SQL 2025 ? |
| SQL Server 2022 - Development |
| Analysis Services Model w/ Direct Query and (Default Veritpaq) - Analysis Services (either the integrated workspace in Power BI or on a SQL Server) lets you interact with the data via: DirectQuery - runtime request transformed into SQL statements against data source Import Modes - runtime request applied against cached in-memory VertPaq data imported (processed) PowerBI and Azure Analysis Services support "composite" models, where some […] |
| Daily aggregation of Azure Blob Storage by tier (created/tier-change/deleted) - Hello all, I’m looking for advice on how to derive a daily snapshot table from a large fact table in SQL Server that tracks Azure Blob Storage metadata. In production this table can have tens of millions of rows, and its structure cannot be changed. To make the problem reproducible, I’ve created the simplified version […] |
| |
| ©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |