Subject | odd select case problem with Firebird |
---|---|
Author | Jose Antunes |
Post date | 2006-08-16T19:13:14Z |
I'm using Firebird 1.5.1.4481, programming with Delphi 6 and Zeoslib.
I'm also using the last version of IBExpert. i have a select statement
at my delphi application that used to run normal but recently its simply
started not to work anymore. strangely, the same program, using the same
database file with the same Firebird version runs ok at my company and
over there the SELECT does work.
right now the only thing comes to my mind is that me and my company, we
have differente IBExpert versions.. im rellay lost on this since its a
normal SELECT CASE. I have also tested with Firebird 1.5.3 here on my
PC and the problem persists...
SELECT T1.num_cupom, T2.nome AS cliente, T2.email,
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 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 62 .. Erro Code: - 104. Invalid token The SQL:
SELECT T1.num_cupom ...
;'. Process stopped.
thank you for any help or ideas.
Murilo Gimenes
Brazil
---------------------------------
Get your email and more, right on the new Yahoo.com
[Non-text portions of this message have been removed]
I'm also using the last version of IBExpert. i have a select statement
at my delphi application that used to run normal but recently its simply
started not to work anymore. strangely, the same program, using the same
database file with the same Firebird version runs ok at my company and
over there the SELECT does work.
right now the only thing comes to my mind is that me and my company, we
have differente IBExpert versions.. im rellay lost on this since its a
normal SELECT CASE. I have also tested with Firebird 1.5.3 here on my
PC and the problem persists...
SELECT T1.num_cupom, T2.nome AS cliente, T2.email,
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 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 62 .. Erro Code: - 104. Invalid token The SQL:
SELECT T1.num_cupom ...
;'. Process stopped.
thank you for any help or ideas.
Murilo Gimenes
Brazil
---------------------------------
Get your email and more, right on the new Yahoo.com
[Non-text portions of this message have been removed]