About 57,900 results
Open links in new tab
  1. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · SELECT IIF(Obsolete = 'N' OR InStock = 'Y', 1, 0) AS Salable, * FROM Product This is effectively just a shorthand (albeit not standard SQL) way of writing CASE. I prefer the conciseness …

  2. SQL Server IIF vs CASE - Stack Overflow

    Apr 3, 2014 · I recently came to know about the availability of IIF function in SQL Server 2012. I always use nested CASE in my queries. I want to know the exact purpose of the IIF statement and when …

  3. sql - Using an IIF statement in a where clause - Stack Overflow

    I am trying to add multiple criteria to a Where clause in SQL Server 2014 using the following code and I am getting a syntax error. I have tried a case statement but ...

  4. sql server - Using IIF in SQL update statement - Stack Overflow

    Feb 15, 2013 · Using IIF in SQL update statement Asked 12 years, 9 months ago Modified 12 years, 9 months ago Viewed 32k times

  5. sql - IIF statement with multiple conditions - Stack Overflow

    Aug 14, 2018 · 1 See whether you find Switch easier than nested IIf statements. Open a new query in the Access query designer, switch to SQL View, and paste in this statement ...

  6. sql - IIF (...) not a recognized built-in function - Stack Overflow

    Aug 20, 2012 · IIF is valid for SQL Server 2008 R2 and any version before that. was introduced in SQL Server 2012 (there is no link to previous versions on the documentation page I have linked to).

  7. sql server - SQL nested IIF function - Stack Overflow

    I try to make a complicated formula in SQL with nested IIF function. There are many IFF's in this formula. But somehow Microsoft query will not take the statement: SELECT IIF (system_Machine.

  8. conditional operator - ORACLE IIF Statement - Stack Overflow

    oracle-database conditional-operator iif edited Jul 8, 2020 at 16:55 MotKohn 4,065 3 27 48

  9. sql server - Error when combining IIF and 'Is Null' - Stack Overflow

    Apr 24, 2018 · 6 IIF (Transact-SQL) was introduced in SQL Server 2012. The problem is you're trying to use a function that doesn't exist, not that IS NULL is an issue. IIF is a shorthand way for writing a …

  10. sql - Using Select statement within a IIF function - Stack Overflow

    Oct 16, 2020 · Using Select statement within a IIF function Asked 5 years, 1 month ago Modified 5 years, 1 month ago Viewed 2k times