Subject odd select case problem
Author Jose Antunes
hello all.. i dont know what to do anymore. i run firebird 1.5 here and at my company. i use a select in my delphi application that used to run normal but recently its simply started not to work anymore here in my computer. strangely, it still runs normal at the company and i haven't changed the code or the tables. i used the following select:

SELECT T1.num_cupom, T1.id_tipo_transacao, T1.data, T1.hora, T1.id_sistema,
T1.id_usuario, T1.id_cliente, T1.opcao, T1.desc_especial,
T1.tt_unidades, T1.total, T1.observacao, t1.confirmada,
T2.codigo_vip, T2.nome AS cliente, T2.email, T2.rg, T2.cpf, T2.cnpj,
T2.razaosoc, T2.fone_res, T2.fone_cel, T2.fone_com, T2.cidade,
CASE t1.confirmada WHEN 0 then 'open'
ELSE 'close' END as status
FROM tab_propostas T1

T1.confirmada is an integer field wich receives 0 or 1 and i want to "translate" this to open or closed. i get the following error from IBExpert:

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 7, char 13.
.

and in delphi, i get something like this:

Project ISIS.exe raised exception class EZSQLException with message 'SQL Error: Dynamic SQL Error SQL error code=-104. Token unknow - line 1, char 333 .. Erro Code: - 104. Invalid token The SQL: SELECT T1.num_cupom ...
;'. Process stopped.

thank you for any help or ideas.


Murilo Gimenes






---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

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