Subject Re: [IB-Conversions] question about sql statement ???????
Author Helen Borrie
At 05:56 PM 02-01-02 +0900, you wrote:
>In sqlserver, this sql statement is success.
>
>' select
> CASE name when 'yang' then 'YANG'
> ELSE name END as fullname from people'
>
>But interbase, Statement failed for CASE and When...
>I want to select column like this statement's result.
>How can i do????

As you've discovered, InterBase and its relatives don't have a CASE construct. It's planned for Firebird 2 but that won't help you if you are converting now.

The usual way to handle this is to use a series of

IF (<CONDITION1>) THEN
BEGIN
<RESPONSE1>;
END
ELSE IF (<CONDITION2>) THEN
BEGIN
<RESPONSE2>;
END
ELSE...

hth

Helen