Top "Case" questions

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

GROUP BY + CASE statement

I have a working query that is grouping data by hardware model and a result, but the problem is there …

sql postgresql group-by case aggregate-functions
Using Case/Switch and GetType to determine the object

Possible Duplicate: C# - Is there a better alternative than this to ‘switch on type’? If you want to switch …

c# .net reflection switch-statement case
PostgreSQL CASE ... END with multiple conditions

Here is an extract of my table: gid | datepose | pvc ---------+----------------+------------ 1 | 1961 | 01 2 | 1949 | 3 | 1990 | 02 1 | 1981 | 1 | | 03 1 | | I want to fill the PVC column …

postgresql case
PostgreSQL Crosstab Query

Does any one know how to create crosstab queries in PostgreSQL? For example I have the following table: Section Status …

sql postgresql pivot case crosstab
List an Array of Strings in alphabetical order

I have a program which has the user inputs a list of names. I have a switch case going to …

java arrays function case
SQL changing a value to upper or lower case

How do you make a field in a sql select statement all upper or lower case? Example: select firstname from …

sql case uppercase lowercase
Case statement in MySQL

I have a database table called 'tbl_transaction' with the following definition: id INT(11) Primary Key action_type ENUM('Expense', …

mysql sql database case
TSQL CASE with if comparison in SELECT statement

I would like to use CASE statement in SELECT. I select from user table, and (as one attribute) I also …

sql sql-server-2008 tsql select case
Case Statement Equivalent in R

I have a variable in a dataframe where one of the fields typically has 7-8 values. I want to collpase …

r case
SELECT query with CASE condition and SUM()

I'm currently using these sql statements. My table has the field CPaymentType which contains "Cash" or "Check". I can sum …

sql sql-server sum case conditional-statements