Production Code (T-SQL Tuesday #156)
Background
T-SQL Tuesday - the brainchild of Adam Machanic and coordinated by Steve Jones (blog|Twitter) is a monthly blog party on the second Tuesday of each month. And I will...
2022-10-31
22 reads
Background
T-SQL Tuesday - the brainchild of Adam Machanic and coordinated by Steve Jones (blog|Twitter) is a monthly blog party on the second Tuesday of each month. And I will...
2022-10-31
22 reads
Scary Scalar Functions series overview
Part One: Parallelism
Part Two: Performance
Part Three: The Cure
Part Four: Your Environment
Foreword
In the previous posts, we have learned why Scalar Functions (UDFs) are bad for parallelism...
2022-10-10 (first published: 2022-10-02)
614 reads
Foreword
Not everything in the general sense, but a tool called Everything by voidtools (Download link). Usually, I have to make this distinction when googling.
No matter how great is my...
2022-09-27
40 reads
The problem
There was a need to make changes to a table with an Indexed View. Since Indexed Views must be created with SCHEMABINDING, the View must be dropped and...
2022-09-19 (first published: 2022-09-05)
325 reads
Foreword
A picture is worth a thousand words. I use screenshots daily, whether it’s to share results, how-to tutorials, point out mistakes or create memes.
None of the tools I’ve tried...
2022-08-11
46 reads
Scary Scalar Functions series overview
Part One: Parallelism
Part Two: Performance
Part Three: The Cure
Foreword
In the first two parts, we have seen why the Scalar functions (UDFs) are a problem for the...
2022-07-29 (first published: 2022-07-24)
561 reads
Foreword
This month’s invitation is from Deborah Melkin (b|t), about venting anything you want. So let’s start this rant.
There are only two hard things in Computer Science: cache invalidation and...
2022-07-29 (first published: 2022-07-12)
280 reads
Scary Scalar Functions series overview
Part One: Parallelism
Part Two: Performance
Foreword
In the second part of this series, we’ll look at how Scalar functions (or UDFs) affect performance.
If you want to follow...
2022-07-18 (first published: 2022-07-02)
563 reads
The problem
In this scenario, you have discovered that one of your Check constraints or Foreign keys is not trusted.
Maybe you’ve detected it with a sp_Blitz, dbachecks or out of...
2022-07-06 (first published: 2022-06-24)
361 reads
Foreword
I’m still surprised many people don’t realise how lousy Scalar functions (aka User Defined Functions aka UDFs) are. So because it’s my current focus in work and this Stack...
2022-06-21
33 reads
By Steve Jones
I went to sleep while reading a Kindle book on my phone. I know...
A conversation with Jan Laš, CIO at HOPI, about what deploying a data agent...
It's time for T-SQL Tuesday #198! This month's topic is change detection. The post T-SQL...
BCA KCP Santa Telpon/wa:0813.7887.595.Jl. Wolter Monginsidi No.54, Petogogan, Kec. Kby. Baru, Kota Jakarta Selatan,...
BCA KCU VETERAN TLP/WA 083800209966 Jl. Veteran No.18-24, Krembangan Sel., Kec. Krembangan, Surabaya, Jawa...
BCA KCU GALAXY TLP/WA 083800209966 Jl. Dr. Ir. H. Soekarno No.37-39, Klampis Ngasem, Kec....
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT TOP 2
json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
See possible answers