IIF Tag Archives

How do I handle a “Error converting data type” error?

A reader recently asked about a error converting data type error they received.  Since this is a common issue, especially when numeric data is stored withing VARCHAR datatypes, I thought you would appreciate the answer I shared with them. I’m using Windows 10 and SQL SMS 2014.  When I run a query, I get the […]

Continue reading
3

Introduction to SQL Server’s Built-In Logical Functions

Logical Circuit

Logical functions provide a way to use logical conditions to display one of several values.  You can use logical functions to test a field’s value such as gender (M or F) and display another value(‘Male’ or ‘Female’) as a result. In this article we describe how to use the CHOOSE and IIF functions.  CHOOSE is […]

Continue reading
>