Top "Case" questions

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

BASH tr command

Id like to convert it to uppercase for the simple purpose of formatting so it will adhere to a future …

linux bash scripting case tr
Multiple Case Statement in SQL with aliases

SELECT DISTINCT AppID, CASE WHEN Category = '< 18 years old' THEN 'yes' ELSE '' END AS '<18years old', …

sql case aliases
Can you GROUP BY with a CASE WHEN THEN alias name?

I have a SELECT statement being calculated from a CASE WHEN THEN state (or could use multiple IF statements) aliased …

mysql sql group-by case
Selected non-aggregate values must be part of the associated group

I have two tables in Teradata: Table_A and Table_B. Between them is LEFT JOIN. Afterwards I am making …

sql group-by case teradata
Regex to change to sentence case

I'm using Notepad++ to do some text replacement in a 5453-row language file. The format of the file's rows is: …

regex notepad++ case
How do I test for an empty string in a Bash case statement?

I have a Bash script that performs actions based on the value of a variable. The general syntax of the …

string bash null case
Case Expression vs Case Statement

What is the difference between a Case Expression and a Case Statement in MySQL? When can they be used, and …

mysql case
WHERE clause with nested multiple conditions

I want to retrieve data with conditions in WHERE clause. Here is my table something look like: Name Location Age …

sql sql-server case where-clause multiple-conditions
How to get 'switch-case' statement functionality in Django templates?

I found a link to have a 'switch' tag in Django templates, but I was wondering if this can be …

django django-templates switch-statement case
MySQL update conditions in one query (UPDATE, SET & CASE)

I'm trying to update a set of records (boolean fields) in a single query if possible. The input is coming …

mysql conditional case