Top "Case" questions

In SQL, the CASE expression evaluates a list of conditions, returning the result for the first condition which evaluates to true.

SQL Case Expression Syntax?

What is the complete and correct syntax for the SQL Case expression?

sql sql-server oracle syntax case
How do I use properly CASE..WHEN in MySQL

Here is a demo query, notice it is very simple, Fetches only where base_price is 0, And still, it chooses …

mysql sql conditional switch-statement case
Switch: Multiple values in one case?

I have the following piece of code, but yet when I enter "12" I still get "You an old person". Isn't 9 …

c# switch-statement case
Can I use a case/switch statement with two variables?

I am a newbie when it comes to JavaScript and it was my understanding that using one SWITCH/CASE statements …

javascript switch-statement case
check for null date in CASE statement, where have I gone wrong?

My source table looks like this Id StartDate 1 (null) 2 12/12/2009 3 10/10/2009 I want to create a select statement, that selects the above, …

sql sql-server-2005 case smalldatetime
Use CASE statement to check if column exists in table - SQL Server

I'm using a SQL server statement embedded in some other C# code; and simply want to check if a column …

sql sql-server case
Mysql SELECT CASE WHEN something then return field

I have two field nnmu and nnmi , if nnmu is equal to 1, I need to return naziv_mesta from **mesto_…

sql select mysql case
where to place CASE WHEN column IS NULL in this query

I'm having some trouble translating an MS Access query to SQL: SELECT id, col1, col2, col3 FROM table1 LEFT OUTER …

sql ms-access null case
CASE in WHERE, SQL Server

I'm doing some search, where users are choosing in dropdown some clauses. When they leave some box empty, I want …

sql sql-server case where
SQL Server IIF vs CASE

I recently came to know about the availability of IIF function in SQL Server 2012. I always use nested CASE in …

sql-server sql-server-2012 case iif