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 Server: use CASE with LIKE

I am pretty new to SQL and hope someone here can help me with this. I have a stored procedure …

sql sql-server stored-procedures case sql-like
Regarding Java switch statements - using return and omitting breaks in each case

Given this method, does this represent some egregious stylistic or semantic faux pas: private double translateSlider(int sliderVal) { switch (sliderVal) { …

java return switch-statement case break
CASE statement in SQLite query

Why this query doesn't work? :( I tried to replace nested IF statement "...SET lkey = IF(lkey >= 11, lkey - 5, IF(…

sqlite nested case
SQL Server - Case Statement

I'm almost certain you cannot do this within the context of the case statement, and I haven't been able to …

sql sql-server syntax case
C# Switch-case string starting with

Is there any way to make a case condition in a switch statement where you say if a string begins …

c# string switch-statement case
How does MySQL CASE work?

I know that SQL's CASE syntax is as follows: CASE WHEN search_condition THEN statement_list [WHEN search_condition THEN …

mysql case
SQL use CASE statement in WHERE IN clause

Is it posible to use case in where in clause? Something like this: DECLARE @Status VARCHAR(50); SET @Status='published'; SELECT * …

sql select switch-statement case where-in
Using CASE in PostgreSQL to affect multiple columns at once

I have a Postgres SELECT statement with these expressions: ,CASE WHEN (rtp.team_id = rtp.sub_team_id) THEN 'testing' …

sql postgresql case
C - Switch with multiple case numbers

So my professor asked us to create a switch statement. We are allowed to use only the "SWITCH" statement to …

c switch-statement case
How do I use Group By based on a Case statement in Oracle?

I have an SQL-query where I use Oracle CASE to compare if a date column is less than or greater …

sql oracle group-by case