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

Introducing the SQL Server on Kubernetes Operator

By

Are you considering replatforming your SQL Server workload due to recent vendor changes, but...

Advice I Like: Rewards from Work

By

The greatest rewards come from working on something that nobody has words for. If...

Overcoming Challenges: Navigating Common Pitfalls in FinOps Adoption

By

Working in DevOps, I’ve seen FinOps do amazing things for cloud cost control, but...

Read the latest Blogs

Forums

The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI

By Terry Jago

Comments posted to this topic are about the item The day-to-day pressures of a...

Analysis Services Model w/ Direct Query and (Default Veritpaq)

By Archivist

Analysis Services (either the integrated workspace in Power BI or on a SQL Server)...

Don't Panic

By Grant Fritchey

Comments posted to this topic are about the item Don't Panic

Visit the forum

Question of the Day

Identities and Sequences IV

When thinking about the identity property and sequence objects, which of these can be used with numeric and decimal data types?

See possible answers