About 51 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. 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 …

  3. 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 …

  4. sql - Can I use CASE expressions in a JOIN condition? - Stack Overflow

    The following image is a part of Microsoft SQL Server 2008 R2 System Views. From the image we can see that the relationship between sys.partitions and sys.allocation_units depends on the value of sys.

  5. Best way to do nested case statement logic in SQL Server

    I'm writing an SQL Query, where a few of the columns returned need to be calculated depending on quite a lot of conditions. I'm currently using nested case statements, but its getting messy. Is th...

  6. 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.

  7. SQL CASE WHEN with multiple AND and OR - Stack Overflow

    Aug 22, 2018 · Can you please tell me if SQL code below makes sense. I am using multiple ANDs and OR in CASE WHEN. Thanks for your help! SELECT id, period, CASE WHEN state = 'group8' AND …

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

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

  9. How do I do multiple CASE WHEN conditions using SQL Server 2008?

    How do I do multiple CASE WHEN conditions using SQL Server 2008? Asked 13 years ago Modified 3 years, 7 months ago Viewed 1.7m times

  10. Como usar CASE dentro de WHERE en SQL Server

    tengo la siguiente parte de un procedimiento en sql Server. FROM Personas as p inner join Estados as e on p.EstadoId=e.Id inner join ListaMarketing_Persona as lmpe on p.Id=lmpe.IdPersona in...