Top "Case" questions

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

ORA-00905: missing keyword

I am getting ORA-00905: missing keyword error when trying to run the following query in Oracle: select distinct MONTH_ID …

sql oracle case ora-00905
CASE statement with GETDATE()

Wondering if you can help a little with the syntax here. Trying to set a variable as a month value …

sql sql-server-2008 case getdate
JavaScript: Can I declare variables inside switch cases?

In C language, you cannot declare any variables inside 'case' statements. switch ( i ){ case 1: int a = 1; //error! break; } However, you …

javascript variables switch-statement case declare
RAISERROR within Case statement

Can you not raise errors within a case statement in T-SQL? I always have problems with SQL case statements :/ begin …

tsql case raiserror
Can I use .include?() in a case statement? Ruby

I have started to learn Ruby. I have a small project to build a game and tried to create a …

ruby include case case-when