About 224,000 results
Open links in new tab
  1. SQL Case Expression Syntax? - Stack Overflow

    Aug 7, 2008 · case expression is the correct term as they evaluate to a scalar value (also. in SQL a statement is terminated by the "statement terminator" which is the semi-colon).

  2. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server.

  3. SQL Switch/Case in 'where' clause - Stack Overflow

    Oct 16, 2008 · SQL Switch/Case in 'where' clause Asked 17 years, 2 months ago Modified 2 years, 10 months ago Viewed 796k times

  4. sql - Case in Select Statement - Stack Overflow

    Jan 7, 2013 · I have an SQL statement that has a CASE from SELECT and I just can't get it right. Can you guys show me an example of CASE where the cases are the conditions and the results are from …

  5. SQL Server CASE .. WHEN .. IN statement - Stack Overflow

    May 18, 2011 · On SQL server 2005 I am trying to query this select statement SELECT AlarmEventTransactionTableTable.TxnID, CASE AlarmEventTransactions.DeviceID WHEN …

  6. SQL CASE statement with OR? - Stack Overflow

    May 20, 2014 · CASE expression has two kinds of syntax - the simple (i.e. one that you are showing), and the searched, with multiple logical conditions. If you would like to use an OR, you need the …

  7. Is SQL syntax case sensitive? - Stack Overflow

    Sep 30, 2008 · Usually case sensitive table and column names are the default on Linux MySQL and case insensitive used to be the default on Windows, but now the installer asked about this during …

  8. CASE .. WHEN expression in Oracle SQL - Stack Overflow

    4 Since web search for Oracle case tops to that link, I add here for case statement, though not answer to the question asked about case expression:

  9. How do I use T-SQL's Case/When? - Stack Overflow

    Jul 27, 2010 · The original query has multiple SELECT statements, so MS SQL server is expecting subqueries. It an easy mistake to make if you're used to some programming languages that use …

  10. "CASE" statement within "WHERE" clause in SQL Server 2008

    Jan 9, 2012 · I am working with a query which contains "CASE" statement within "WHERE" clause. But SQL Server 2008 is giving some errors while executing it. Can anyone please help me with the …