Subject | RE: [firebird-support] Query help needed |
---|---|
Author | Leyne, Sean |
Post date | 2007-02-05T20:27:47Z |
Rick,
CASE
WHEN V1 => 30 THEN 'C'
WHEN V1 < 20 THEN 'A'
ELSE 'B'
END
Sean
> Given the number 25, I'd like to get the value 'B' back from theTry the following:
> following (simplified) table:
>
> V1 V2
> -- --
> 10 A
> 20 B
> 30 C
>
> Numbers 30 and above should return 'C', and numbers below 20 should
> return 'A'.
> This should be simple, but I just can't think today.
CASE
WHEN V1 => 30 THEN 'C'
WHEN V1 < 20 THEN 'A'
ELSE 'B'
END
Sean