Articles

External Article

DAX CASE Statement Functionality with IF, SWITCH and SWITCH True

The CASE expression is one of the most valuable tools in your T-SQL toolbox. I use it in almost every query I write. However, there isn't a direct equivalent of CASE in DAX. Since it's a different language entirely, I don't expect it. As my grandmother used to say, I am not surprised, just disappointed. If you don't know, DAX (Data Analysis Expressions) is a language for creating custom calculations and aggregations in Power Pivot, Power BI, and other data analysis tools. Two functions in DAX come close to replicating the functionality but come with limitations. Which one of these functions should you use? Please stay tuned.

2023-04-03

External Article

Piping, Filtering and Using Flyway Output in PowerShell

Flyway's output is often overwhelmed with verbose messages, most of which we can ignore but some of which provide vital warnings about failed compilations, or useful details about what a migration or callback did. I'll show how to use some pipeline-aware PowerShell functions to filter out and save the bits we want and pass the results along in a form that is useful to the next process in the pipeline.

2023-03-29

External Article

Using TOP clause in a SELECT statement

There might be a time when you might want to return just a few rows of a result set, instead of the complete set. This might be useful if you want to just validate a selection criteria or a few rows of data. For whatever the reason the TOP clause can be used to return a specific number or a percentage of rows from a result set. This article will cover using the TOP clause in a SELECT statement and how it can be used to return a partial set of records.

2023-03-29

Blogs

Export a Power BI Report that cannot be Downloaded

By

Yes, you’re reading that right, we’re going to download a report that cannot be...

Query Intelligence in SQL Server 2025: What Developers Need to Know

By

When Microsoft announced SQL Server 2025, I was curious about what would truly change...

Finding and Killing Blockers with Redgate AI Tech

By

Redgate has a research arm, called the Foundry, that has been experimenting with AIs...

Read the latest Blogs

Forums

Poor Name Choice

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Poor Name Choice

Getting the Indexed Columns

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Getting the Indexed Columns

T-SQL in SQL Server 2025: Substring Changes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item T-SQL in SQL Server 2025:...

Visit the forum

Question of the Day

Getting the Indexed Columns

I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?

SELECT   
    INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail')

See possible answers