Stairway to T-SQL Beyond The Basics

Stairway to T-SQL: Beyond The Basics Level 6: Using the CASE Expression and IIF Function

There are times where you need to write a single T-SQL statement that is able to return different T-SQL expressions based on the evaluation of another expression. When you need this kind of functionality you can use the CASE expression or IIF function to meet this requirement. In this Stairway level Gregory Larsen reviews the CASE and IIF syntax and showing you examples of how the CASE expression and IIF function.

Blogs

A New Word: the Kinder Surprise

By

the kinder surprise – . the point in your early adolescence when you realize...

VPN + SQL Server Connections: Why Long-Working Setups Suddenly Fail with Msg 10054 and “Connection Broken”

By

Over the past few weeks, I’ve been contacted by multiple customers experiencing the same...

Future IT Roles – Agentic Architect and AI Boom!!

By

These days everything is changing to AI World, IT roles are getting changed and...

Read the latest Blogs

Forums

There's Too Much to Learn

By Steve Jones - SSC Editor

Comments posted to this topic are about the item There's Too Much to Learn

How to Calculate Distance Between Coordinates in SQL Server

By Imran2629

Comments posted to this topic are about the item How to Calculate Distance Between...

SSoL Support on the OS

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SSoL Support on the OS

Visit the forum

Question of the Day

SSoL Support on the OS

On which Linux versions is SQL Server 2025 on Linux supported?

See possible answers