Subject Re: [firebird-support] Problem with CASE.
Author Hans
Maybe try

SELECT EMP_NO, case Coalesce(EMP_NO,'adeus') when 11 then 'oi' end as caso


----- Original Message -----
From: "João Luiz" <jll.listas@...>
To: <firebird-support@yahoogroups.com>
Sent: Wednesday, August 18, 2010 1:29 PM
Subject: Re: [firebird-support] Problem with CASE.


I take a pic, if it helps...

http://img833.imageshack.us/img833/1456/errorsd.png

Bye.


From: Philippe Makowski
Sent: Wednesday, August 18, 2010 4:11 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Problem with CASE.



2010/8/18 João Luiz <jll.listas@...>
> I'm using Firebird 2.1.3.

So you certainly made a typo somewhere

$ isql localhost:employee -user SYSDBA -password masterkey
Database: localhost:employee, User: SYSDBA
SQL> show version;
ISQL Version: UI-V2.1.3.18185 Firebird 2.1
Server version:
Firebird/Darwin/Intel64 (access method), version "UI-V2.1.3.18185 Firebird
2.1"
Firebird/Darwin/Intel64 (remote server), version "UI-V2.1.3.18185
Firebird 2.1/tcp (callandor.local)/P11"
Firebird/Darwin/Intel64 (remote interface), version "UI-V2.1.3.18185
Firebird 2.1/tcp (callandor.local)/P11"
on disk structure version 11.1
SQL> SELECT EMP_NO, case EMP_NO when 11 then 'oi' end as caso
CON> FROM EMPLOYEE;

EMP_NO CASO
======= ======
2 <null>
4 <null>
5 <null>
8 <null>
9 <null>
11 oi
12 <null>
14 <null>




[Non-text portions of this message have been removed]



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links