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

    Aug 7, 2008 · What is the complete and correct syntax for the SQL Case expression?

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

  3. sql - Case in Select Statement - Stack Overflow

    Jan 7, 2013 · My answer explaining two case types 1. Simple CASE expression 2. Searched CASE expressions. And both type's case usage in SELECT, UPDATE, With ORDER BY, With …

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

  5. What is the equivalent of Select Case in Access SQL?

    Apr 3, 2013 · Select Case OpeningBalance Case 0 To 5000 commission = 20 Case 5001 To 10000 commission = 30 Case 10001 To 20000 commission = 40 Case Else commission = 50 …

  6. How do I do multiple CASE WHEN conditions using SQL Server …

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

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

    CASE .. WHEN expression in Oracle SQL Asked 13 years, 1 month ago Modified 4 years, 8 months ago Viewed 959k times

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

    Apr 21, 2012 · A CASE expression returns a value from the THEN portion of the clause. You could use it thusly: SELECT * FROM sys.indexes i JOIN sys.partitions p ON i.index_id = …

  9. using sql count in a case statement - Stack Overflow

    Aug 29, 2015 · Which lines up with the docs for Aggregate Functions in SQL Docs for COUNT: COUNT(*) - returns the number of items in a group. This includes NULL values and duplicates. …

  10. T-SQL: Using a CASE in an UPDATE statement to update certain …

    You can't use a condition to change the structure of your query, just the data involved. You could do this: update table set columnx = (case when condition then 25 else columnx end), columny …