Top "Case-statement" questions

A case statement allows sequences of SQL statements to be selected for execution based on search or comparison criteria, and is typically used in stored procedures.

Mysql CASE NOT FOUND for CASE STATEMENT on a Stored Procedure

im trying to create a stored procedure that have multiples CASE STATEMENTS I have the following stored procedure: BEGIN CASE @…

mysql stored-procedures case-statement
CASE Statement in where clause using equal to and IN

WHERE CONDITION1='ABC' AND Status = CASE @Option WHEN 1 THEN 'True' WHEN 2 THEN 'False' WHEN 3 THEN NULL WHEn 4 THEN **IN ('True', …

sql sql-server-2008 case-statement in-clause
How can I test that a value is within a range with a "case" statement instead of an "if" statement?

Can the following if statement be converted to a case statement? if (Number >= 5) and (Number <= 10) then lblAnswer.Caption := …

delphi syntax if-statement case-statement
Query with many CASE statements - optimization

I have one very dirty query that per sure can be optimized because there are so many CASE statements in …

sql sql-server tsql query-optimization case-statement
How to handle multiple values inside one case?

How to handle multiple values inside one case? So if I want to execute the same action for value "first …

c# .net switch-statement case-statement
Verilog case statement

Could we have any syntax where case statement is scalable? Let me explain with an example: Mux If there were …

verilog case-statement
Why is CharInSet faster than Case statement?

I'm perplexed. At CodeRage today, Marco Cantu said that CharInSet was slow and I should try a Case statement instead. …

delphi delphi-2009 case-statement
How do you test inequality with Oracle Case Statement

This works fine: select case (1+2) -- (or_some_more_complicated_formula_yielding_a_numeric_result) when 200 then '200' when 100 …

sql oracle case-statement
VB.NET Stacking Select Case Statements together like in Switch C#/Java

Seems If I stack the Cases together they don't work as one. Since VB.NET Cases don't require the use …

vb.net switch-statement case-statement
IF and Case statements in MySQL

I would like to select * if 5 is greater than 2, if false select a particular column. Where am I going wrong? …

mysql if-statement case-statement