About 574,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. 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 …

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

    244 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 …

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

    Oct 16, 2008 · In SQL the rest of the expression does get evaluated in the OR syntax. Try this (it wouldn't let me include the @ symbol - you will have to correct it if you want to test it): declare …

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

  6. Can I use CASE statement in a JOIN condition? - Stack Overflow

    Apr 21, 2012 · 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 …

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

  8. oracle sql - select statement with multiple "case when" and check …

    Jul 11, 2016 · I look for a working example where I can use mutliple when case statment wihch check to verify if a specific text is contained: e.g. SELECT ID, NAME, (SELECT (Case when …

  9. SQL Server Case Statement when IS NULL - Stack Overflow

    Jul 26, 2013 · I'm trying to do an IF statement type function in SQL server. Where there is a NULL in the field, I want it to take a field from one of the tables and add 10 days to it. And if possible …

  10. CASE (Contains) rather than equal statement - Stack Overflow

    Jun 5, 2012 · Is there a method to use contain rather than equal in case statement? For example, I am checking a database table has an entry lactulose, Lasix (furosemide), oxazepam, …