Subject | Re: [IB-Conversions] question about sql statement ??????? |
---|---|
Author | Helen Borrie |
Post date | 2002-01-02T09:35:09Z |
At 05:56 PM 02-01-02 +0900, you wrote:
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
>In sqlserver, this sql statement is success.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.
>
>' 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????
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