Press "Enter" to skip to content

Author: Kevin Feasel

RAISERROR vs THROW

Andy Brownsword looks at the two ways to bubble up an error in SQL Server:

I don’t use RAISERROR often – I usually forget which severity code to use. After looking at a sprinkling of them recently I decided it was time for a refresher, so come along for the ride.

If you check out the online documentation it states that “New applications should use THROW instead”. It also sounds like its used to raise ‘RROR’s (whatever they are?). Neither are quite the whole story though. Let’s get into it.

My general rule of thumb is that I tend to use THROW most of the time, but RAISERROR in loops so that I can print out how far along in the process something is, as there is no WITH NOWAIT equivalent to THROW. Andy mentions using THROW; without additional parameters, and that’s very helpful when you want to maintain the original error message rather than wrapping your own around it. It’s not quite as useful as a re-throw in a language like C#, where you keep stack trace information, but helps with troubleshooting.

As for not doubling the letter if it is the last letter of the first word and first letter of the second word (raise error or help protect), it was the fashion at the time, like wearing a yellow onion on your belt. I suppose the intent was to prevent typos or make it look slightly better, but I’ve never been a fan.

Comments closed

Cross-Validation and Time Series Data

Vlad Johnson takes us through a technique to test time series results:

Time series modeling, compared to traditional nontemporal modeling, presents unique challenges in ensuring that models generalize well to future, unseen data. One key methodology to address these challenges is cross-validation.

Time series data inherently contains temporal dependencies — observations are ordered in time, and future values may depend on past trends. This structure makes it challenging to estimate how well a model will perform on new, unseen data.

Click through for an explanation of cross-validation, why this becomes challenging when you have time series data (or other serially correlated data), and tips to resolve this challenge.

Comments closed

Natural Language Querying in SQL Server

Hadi Fadlallah shells out to an API:

Data is usually the most important asset in organizations, but only SQL developers can frequently access that data. Technical teams often write queries for non-technical users. This restricts agility, slows decision-making, and creates a bottleneck in data accessibility. One possible remedy is natural language processing (NLP), which enables users to ask questions in simple English and receive answers without knowing any code. Still, the majority of NLP-to-SQL solutions are cloud-based, which raises issues with cost and privacy.

This particular solution has nothing to do with the embedding features in SQL Server 2025. Instead, it essentially shells out to an Ollama API and runs the resulting SQL query. It’s reasonably neat but I’d have so many qualms putting anything like this into production.

Comments closed

Skewed Data and Skewed Parallelism

Erik Darling has a new slide deck. This video focuses on how skewed data can potentially lead to parallelism not distributing the data on different CPU threads effectively. Erik demonstrates how you can identify this issue in practice, though solving the problem will come in a later video. It’s an interesting scenario and stick around for a poke at an argument Pedro Lopes has made.

Comments closed

Microsoft Fabric Extension for VS Code now GA

Sunitha Muthukrishna announces an update to an extension:

Manage Fabric items programmatically: Use item definitions to unlock scripting and work with your items as files. You can update and deploy Fabric items to existing workspaces or new workspaces directly from VS Code—saving you time and effort. Fabric items, that have Item definitions API support, support this capability.

Read on to see what else made the cut.

Comments closed

Dynamic Landing Pages for Embedded Power Apps

Jon Vöge has one landing page to rule them all:

In either scenario, we would of course like to solve this using 1 app with multiple screens, and dynamically open up different screens depending on a parameter.

We would not want to develop two almost identical apps, with governance on each app, just to be able to present different landing pages for each scenario.

So how do you do it? Read on below for the answer…

Click through for the scenario depictions as well as the answer.

Comments closed

Tracking when Workspace Monitoring Throttles Power BI Queries

Chris Webb wants to know if Workspace Monitoring is throttling any Power BI queries in Microsoft Fabric:

A lot of new documentation was published recently around Fabric capacities, including documentation on how to size and govern capacities and how to troubleshoot problems with capacities. The latter has instructions on how to use the Capacity Metrics App to determine if your Power BI queries are being throttled; it mentions that you can also determine if queries have been throttled using Workspace Monitoring or Log Analytics but doesn’t go into details about how, something I will address in this post.

Read on to learn more.

Comments closed

First Impressions of SSMS 22 Preview 1

Reitse Eskens tries out the new preview of SQL Server Management Studio 22:

We’re almost used to SQL Server Management Studio (SSMS) 21, and now 22 is already in preview. So, let’s see where it’s available for download, install it and see what’s different.

There’s not a huge amount of new functionality, and Reitse spends some time on the big one: that SSMS is moving from the Azure OpenAI integration that they introduced in SSMS 21 to a GitHub Copilot integration in 22, but it’s not in the preview just yet.

Comments closed

Conditional Formatting for Clarity in Power BI

Ben Richardson tells a story:

Consider a typical sales dashboard filled with charts, KPIs, and large tables.

Users often have to guess what is important, read legends, or ask questions like “What does this mean?” or “Which numbers require attention?”

Many dashboards display data but do not guide users to key insights effectively.

Read on for a few different possibilities based around conditional formatting.

Comments closed