Subject | RE: [firebird-support] odd select case problem with Firebird |
---|---|
Author | Leyne, Sean |
Post date | 2006-08-16T19:25:46Z |
> SELECT T1.num_cupom, T2.nome AS cliente, T2.email,from
> CASE t1.confirmada WHEN 0 then 'open'
> ELSE 'close' END as status
> FROM tab_propostas T1
> LEFT JOIN tab_clientes T2 on T2.id = T1.id_cliente
>
> T1.confirmada is a small integer field wich receives 0 or 1 and i want
> to "translate" this to 'open' or 'closed'. i get the following error
> IBExpert:Try:
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 7, char 13.
> .
SELECT
...
CASE WHEN t1.confirmada = 0 then 'open' ELSE 'close' END as status
FROM...
Sean