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

    Sep 15, 2008 · Looks like an old question, however if I understood your question and thought correctly, you want to implement the if/else conditional statement in SQL. Both are calculated …

  2. SQL: IF clause within WHERE clause - Stack Overflow

    Sep 18, 2008 · END ELSE BEGIN SELECT * FROM Table WHERE OrderNumber LIKE '%' + @OrderNumber END 3) Using a long string, compose your SQL statement conditionally, and …

  3. sql - can you do an ELSE WHEN on a CASE - Stack Overflow

    Nov 4, 2011 · No, ELSE is a catch-all. In your example, it's not clear why you would want to include a condition in the ELSE clause, since you've already checked the logically opposite …

  4. If else in stored procedure sql server - Stack Overflow

    If else in stored procedure sql server Asked 12 years, 3 months ago Modified 5 years, 11 months ago Viewed 596k times

  5. Using If else in SQL Select statement - Stack Overflow

    Nov 23, 2012 · ID | IDParent Then in my program I have to test if IDParent is < 1 then use ID ELSE use IDParent Is there a way to use an If Else like condition in SQL to return only single …

  6. Using Nested IF ELSE statements in sql - Stack Overflow

    Using Nested IF ELSE statements in sql Asked 11 years, 10 months ago Modified 11 years, 10 months ago Viewed 101k times

  7. SQL Server: IF EXISTS ; ELSE - Stack Overflow

    SQL Server: IF EXISTS ; ELSE Asked 14 years, 3 months ago Modified 6 years, 2 months ago Viewed 745k times

  8. sql server - SQL If-Else in the WHERE clause with conditions based …

    Sep 7, 2017 · SQL If-Else in the WHERE clause with conditions based on column values Asked 8 years, 3 months ago Modified 8 years, 3 months ago Viewed 30k times

  9. SQL Create a new column with if/else condition - Stack Overflow

    Dec 21, 2015 · SQL Create a new column with if/else condition Asked 9 years, 11 months ago Modified 9 years, 11 months ago Viewed 11k times

  10. python - Spark Equivalent of IF Then ELSE - Stack Overflow

    There are different ways you can achieve if-then-else. Using when function in DataFrame API. You can specify the list of conditions in when and also can specify otherwise what value you …